View Ticket
Not logged in
Ticket UUID: 607bc372c6def2e7ff87859fbe78c977fab12ecb
Title: Segmentation fault fossil open ../clone.fsl
Status: Fixed Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Fixed
Last Modified: 2009-07-22 18:23:31
Version Found In: 767ae79c3d
Description & Comments:
Get 6663 Segmentation fault on "fossil open ../clone.fsl".

0. Prebuilt fossil binary version 767ae79c3d for Linux on amd64. Running on Linux 2.6.18-128.2.1.el5xen #1 SMP Tue Jul 14 07:07:49 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux 1. Started with repo golden.fsl (autosync 1) 2. cloned it to clone.fsl (autosync 1) 3. opened the clone, added a file, commited, closed 4. tried second open and got segmentation fault.

Shell script to reproduce problem below, with cut/paste of script execution.

cat > bug.sh <<EOF
#!/bin/bash
fossil version
rm -rf testsync
mkdir -p testsync/co
cd testsync
echo 888888888888888888888888888 creating golden.fsl
fossil new golden.fsl
fossil setting autosync 1 -R golden.fsl
fossil setting clearsign 0 -R golden.fsl
echo   888888888888888888888888888 cloning to clone.fsl
# fossil clone file://golden.fsl clone.fsl
fossil clone golden.fsl clone.fsl
echo   888888888888888888888888888 open clone.fsl
cd co
fossil open ../clone.fsl
echo 888888888888888888888888888 adding file.txt to clone.fsl
echo "test line 1" > file.txt
fossil add file.txt
echo   888888888888888888888888888 now commit clone.fsl
fossil commit -m "added file.txt"
echo   888888888888888888888888888 now close clone.fsl
fossil close
cd ..
echo   888888888888888888888888888 open clone.fsl
cd co
fossil open ../clone.fsl
echo   888888888888888888888888888 adding file2.txt to clone.fsl
echo "test line 1" > file2.txt
fossil add file2.txt
echo   888888888888888888888888888 now commit clone.fsl
fossil commit -m "added file2.txt"
echo   888888888888888888888888888 now close clone.fsl
fossil close
cd ..
EOF

Output from above script is:

[jgm@centos fossil]$ ./bug1.sh
This is fossil version [767ae79c3d] 2009-04-24 18:40:03 UTC
888888888888888888888888888 creating golden.fsl
project-id: 376259cb21ae0842ced3944f8957bfa423f7ea09
server-id:  cd966662db19ee7eb0e7e8807ab7e58f9db665fa
admin-user: jgm (initial password is "709262")
888888888888888888888888888 cloning to clone.fsl
Repository cloned into clone.fsl
Rebuilding repository meta-data...
1 (100%)...
project-id: 376259cb21ae0842ced3944f8957bfa423f7ea09
server-id:  fa0ce966e276f68c299e7a06b63e14d797e780a2
admin-user: jgm (password is "709262")
888888888888888888888888888 open clone.fsl
888888888888888888888888888 adding file.txt to clone.fsl
ADDED  file.txt
888888888888888888888888888 now commit clone.fsl
Autosync:  file:///home/jgm/storage/workspace/fossil/testsync/golden.fsl
                Bytes      Cards  Artifacts     Deltas
Send:             130          1          0          0
Received:          46          2          0          0
New_Version: 58edecc0e57a46f2016c2e8281a9e4099992f9f1
Autosync:  file:///home/jgm/storage/workspace/fossil/testsync/golden.fsl
                Bytes      Cards  Artifacts     Deltas
Send:             677          5          2          0
Received:         138          5          0          0
888888888888888888888888888 now close clone.fsl
888888888888888888888888888 open clone.fsl
Autosync:  file:///home/jgm/storage/workspace/fossil/testsync/golden.fsl
                Bytes      Cards  Artifacts     Deltas
Send:             130          1          0          0
sh: : command not found
./bug1.sh: line 31:  6663 Segmentation fault      fossil open ../clone.fsl
888888888888888888888888888 adding file2.txt to clone.fsl
ADDED  file2.txt
888888888888888888888888888 now commit clone.fsl
Autosync:  file:///home/jgm/storage/workspace/fossil/testsync/golden.fsl
                Bytes      Cards  Artifacts     Deltas
Send:             130          1          0          0
Received:         138          4          0          0
fossil: would fork.  "update" first or use -f or --force.
888888888888888888888888888 now close clone.fsl
fossil: there are unsaved changes in the current checkout

drh added on 2009-07-22 12:47:34:
The problem seems to have already been fixed by check-in 915bfd99fec69f978. I have posted the latest binaries on the website for ease of downloading.

Thank you for an exceptionally clear bug report.