[fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
Hello, Using a recent trunk version of fossil, built with gcc on Solaris 10 on an UltraSPARC system, I get a bus error from fossil new: $ ./fossil new t.fossil Bus Error (core dumped) $ ./fossil version -v This is fossil version 1.26 [5d74ce03da] 2013-07-17 12:56:17 UTC Compiled on Jul 17 2013 21:46:29 using gcc-4.8.1 (32-bit) SQLite 3.8.0 2013-07-17 11:54:47 64bf8148b8 zlib 1.2.3 $ gdb fossil core Python Exception type 'exceptions.ImportError' No module named gdb: warning: Could not load the Python gdb module from `/opt/gdb7.6/share/gdb/python'. Limited Python support is available from the _gdb module. Suggest passing --data-directory=/path/to/gdb/data-directory. GNU gdb (GDB) 7.6 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as sparc-sun-solaris2.10. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /export/home/erb/tmp/t2/fossil...done. [New LWP 1] [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 whereLoopAddAll (pBuilder=0xffbff280) at src/sqlite3.c:109401 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); (gdb) list 109396/* Loop over the tables in the join, from left to right */ 109397pNew = pBuilder-pNew; 109398whereLoopInit(pNew); 109399for(iTab=0, pItem=pTabList-a; iTabnTabList; iTab++, pItem++){ 109400 pNew-iTab = iTab; 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); 109402 if( ((pItem-jointype|priorJoinType) (JT_LEFT|JT_CROSS))!=0 ){ 109403mExtra = mPrior; 109404 } 109405 priorJoinType = pItem-jointype; (gdb) q The error does not occur if fossil is built with -m64. The error occurs using both the Solaris 10 provided gcc 3.4.3 and a locally built gcc 4.8.1. The error does not occur when using the Solaris Studio C compiler. -- Edward Berner ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On 7/17/13, Edward Berner e...@bernerfam.com wrote: Hello, Using a recent trunk version of fossil, built with gcc on Solaris 10 on an UltraSPARC system, I get a bus error from fossil new: $ ./fossil new t.fossil Bus Error (core dumped) $ ./fossil version -v This is fossil version 1.26 [5d74ce03da] 2013-07-17 12:56:17 UTC Compiled on Jul 17 2013 21:46:29 using gcc-4.8.1 (32-bit) SQLite 3.8.0 2013-07-17 11:54:47 64bf8148b8 zlib 1.2.3 $ gdb fossil core Python Exception type 'exceptions.ImportError' No module named gdb: warning: Could not load the Python gdb module from `/opt/gdb7.6/share/gdb/python'. Limited Python support is available from the _gdb module. Suggest passing --data-directory=/path/to/gdb/data-directory. GNU gdb (GDB) 7.6 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as sparc-sun-solaris2.10. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /export/home/erb/tmp/t2/fossil...done. [New LWP 1] [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 whereLoopAddAll (pBuilder=0xffbff280) at src/sqlite3.c:109401 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); (gdb) list 109396/* Loop over the tables in the join, from left to right */ 109397pNew = pBuilder-pNew; 109398whereLoopInit(pNew); 109399for(iTab=0, pItem=pTabList-a; iTabnTabList; iTab++, pItem++){ 109400 pNew-iTab = iTab; 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); 109402 if( ((pItem-jointype|priorJoinType) (JT_LEFT|JT_CROSS))!=0 ){ 109403mExtra = mPrior; 109404 } 109405 priorJoinType = pItem-jointype; (gdb) q The error does not occur if fossil is built with -m64. I guess that's one fix then -- what's the output of bt full in gdb? The error occurs using both the Solaris 10 provided gcc 3.4.3 and a locally built gcc 4.8.1. The error does not occur when using the Solaris Studio C compiler. -- Edward Berner ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- Brad Harder Method Logic Digital Consulting http://www.methodlogic.net/ http://twitter.com/bcharder ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On 7/17/2013 11:24 PM, B Harder wrote: On 7/17/13, Edward Berner e...@bernerfam.com wrote: Hello, Using a recent trunk version of fossil, built with gcc on Solaris 10 on an UltraSPARC system, I get a bus error from fossil new: $ ./fossil new t.fossil Bus Error (core dumped) $ ./fossil version -v This is fossil version 1.26 [5d74ce03da] 2013-07-17 12:56:17 UTC Compiled on Jul 17 2013 21:46:29 using gcc-4.8.1 (32-bit) SQLite 3.8.0 2013-07-17 11:54:47 64bf8148b8 zlib 1.2.3 $ gdb fossil core Python Exception type 'exceptions.ImportError' No module named gdb: warning: Could not load the Python gdb module from `/opt/gdb7.6/share/gdb/python'. Limited Python support is available from the _gdb module. Suggest passing --data-directory=/path/to/gdb/data-directory. GNU gdb (GDB) 7.6 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as sparc-sun-solaris2.10. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /export/home/erb/tmp/t2/fossil...done. [New LWP 1] [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 whereLoopAddAll (pBuilder=0xffbff280) at src/sqlite3.c:109401 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); (gdb) list 109396/* Loop over the tables in the join, from left to right */ 109397pNew = pBuilder-pNew; 109398whereLoopInit(pNew); 109399for(iTab=0, pItem=pTabList-a; iTabnTabList; iTab++, pItem++){ 109400 pNew-iTab = iTab; 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); 109402 if( ((pItem-jointype|priorJoinType) (JT_LEFT|JT_CROSS))!=0 ){ 109403mExtra = mPrior; 109404 } 109405 priorJoinType = pItem-jointype; (gdb) q The error does not occur if fossil is built with -m64. I guess that's one fix then -- what's the output of bt full in gdb? (gdb) bt full #0 whereLoopAddAll (pBuilder=0xffbff280) at src/sqlite3.c:109401 pWInfo = 0x1b5738 pTabList = optimized out pItem = 0x1b2260 db = 0x1a1da0 nTabList = 1 pNew = 0x1b5a04 mPrior = 0 iTab = 0 mExtra = 0 rc = 0 priorJoinType = 0 '\000' #1 sqlite3WhereBegin (pParse=pParse@entry=0x1b3688, pTabList=pTabList@entry=0x1b2258, pWhere=optimized out, pWhere@entry=0x0, pOrderBy=optimized out, pOrderBy@entry=0x1b2058, pResultSet=0x1b2658, wctrlFlags=optimized out, iIdxCur=iIdxCur@entry=0) at src/sqlite3.c:44747 nTabList = optimized out pWInfo = 0x1b5738 v = optimized out notReady = optimized out sWLB = {pWInfo = 0x1b5738, pWC = 0x1b5878, pOrderBy = 0x1b2058, pNew = 0x1b5a04, pOrSet = 0x0} pMaskSet = 0x1b5774 pLevel = optimized out pLoop = optimized out ii = optimized out db = 0x1a1da0 rc = 1783432 #2 0x000d27d4 in sqlite3Select (pParse=pParse@entry=0x1b3688, p=optimized out, pDest=pDest@entry=0xffbff4b8) at src/sqlite3.c:100410 wctrlFlags = optimized out i = optimized out j = optimized out pWInfo = optimized out v = 0x1b3a40 isAgg = optimized out pEList = 0x1b2658 pTabList = 0x1b2258 pWhere = 0x0 pOrderBy = optimized out pGroupBy = 0x0 pHaving = optimized out rc = 1 addrSortIndex = 1 sDistinct = {isTnct = 0 '\000', eTnctType = 0 '\000', tabTnct = 0, addrTnct = 0} sAggInfo = {directMode = 0 '\000', useSortingIdx = 0 '\000', sortingIdx = 0, sortingIdxPTab = 0, nSortingColumn = 0, pGroupBy = 0x0, aCol = 0x0, nColumn = 0, nAccumulator = 0, aFunc = 0x0, nFunc = 0} iEnd = optimized out db = optimized out iRestoreSelectId = optimized out #3 0x000e4570 in yy_reduce (yyruleno=112, yypParser=0x188800 yy_shift_ofst+460) at src/sqlite3.c:112983 dest = {eDest = 5 '\005', affSdst = 0 '\000', iSDParm = 0, iSdst = 0, nSdst = 0} yygoto = optimized out yygotominor = {yyinit = 0, yy0 = {z = 0x0, n = 0}, yy64 = {pLimit = 0x0, pOffset = 0x0}, yy122 = 0x0, yy159 = 0x0, yy180 = 0x0, yy207 = {value = 0, mask = 0}, yy258 = 0 '\000', yy305 = 0, yy318 = {eOperator = {z = 0x0, n = 0}, bNot = 0}, yy327 = 0x0, yy342 = {pExpr = 0x0, zStart = 0x0, zEnd = 0x0}, yy347 = 0x0, yy392 = 0, yy410 = {a = 0, b = 0x0}, yy442 = 0x0, yy487 = {pList = 0x0, pSelect = 0x0}} yymsp = 0x1b4cf4 yysize = optimized out pParse = optimized out #4 sqlite3Parser (yyp=yyp@entry=0x1b4cc8, yymajor=yymajor@entry=1, yyminor=error reading variable: Cannot access memory at address 0x198,
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On Thu, Jul 18, 2013 at 2:12 AM, Edward Berner e...@bernerfam.com wrote: Hello, Using a recent trunk version of fossil, built with gcc on Solaris 10 on an UltraSPARC system, I get a bus error from fossil new: $ ./fossil new t.fossil Bus Error (core dumped) I'm unable to replicate the problem. The latest Fossil works fine for me on Solaris and SPARC. But see my question below $ ./fossil version -v This is fossil version 1.26 [5d74ce03da] 2013-07-17 12:56:17 UTC Compiled on Jul 17 2013 21:46:29 using gcc-4.8.1 (32-bit) SQLite 3.8.0 2013-07-17 11:54:47 64bf8148b8 zlib 1.2.3 $ gdb fossil core Python Exception type 'exceptions.ImportError' No module named gdb: warning: Could not load the Python gdb module from `/opt/gdb7.6/share/gdb/python'** . Limited Python support is available from the _gdb module. Suggest passing --data-directory=/path/to/gdb/**data-directory. GNU gdb (GDB) 7.6 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.** html http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as sparc-sun-solaris2.10. For bug reporting instructions, please see: http://www.gnu.org/software/**gdb/bugs/http://www.gnu.org/software/gdb/bugs/ ... Reading symbols from /export/home/erb/tmp/t2/**fossil...done. [New LWP 1] [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 whereLoopAddAll (pBuilder=0xffbff280) at src/sqlite3.c:109401 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); (gdb) list 109396/* Loop over the tables in the join, from left to right */ 109397pNew = pBuilder-pNew; 109398whereLoopInit(pNew); 109399for(iTab=0, pItem=pTabList-a; iTabnTabList; iTab++, pItem++){ 109400 pNew-iTab = iTab; 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); Can you use the debugger to give us the value of pWInfo-sMaskSet please? Perhaps this is an alignment problem. 109402 if( ((pItem-jointype|**priorJoinType) (JT_LEFT|JT_CROSS))!=0 ){ 109403mExtra = mPrior; 109404 } 109405 priorJoinType = pItem-jointype; (gdb) q The error does not occur if fossil is built with -m64. The error occurs using both the Solaris 10 provided gcc 3.4.3 and a locally built gcc 4.8.1. The error does not occur when using the Solaris Studio C compiler. -- Edward Berner __**_ fossil-users mailing list fossil-users@lists.fossil-scm.**org fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:**8080/cgi-bin/mailman/listinfo/**fossil-usershttp://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On 7/18/2013 5:22 AM, Richard Hipp wrote: On Thu, Jul 18, 2013 at 2:12 AM, Edward Berner e...@bernerfam.com mailto:e...@bernerfam.com wrote: Hello, Using a recent trunk version of fossil, built with gcc on Solaris 10 on an UltraSPARC system, I get a bus error from fossil new: $ ./fossil new t.fossil Bus Error (core dumped) I'm unable to replicate the problem. The latest Fossil works fine for me on Solaris and SPARC. But see my question below Bummer, I'd hoped it would be reproducible. (I wonder what is different about my system.) Here is some system info, just in case: $ uname -a SunOS v245 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Fire-V245 $ cat /etc/release Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved. Assembled 17 January 2013 $ ./fossil version -v This is fossil version 1.26 [5d74ce03da] 2013-07-17 12:56:17 UTC Compiled on Jul 17 2013 21:46:29 using gcc-4.8.1 (32-bit) SQLite 3.8.0 2013-07-17 11:54:47 64bf8148b8 zlib 1.2.3 $ gdb fossil core Python Exception type 'exceptions.ImportError' No module named gdb: warning: Could not load the Python gdb module from `/opt/gdb7.6/share/gdb/python'. Limited Python support is available from the _gdb module. Suggest passing --data-directory=/path/to/gdb/data-directory. GNU gdb (GDB) 7.6 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as sparc-sun-solaris2.10. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /export/home/erb/tmp/t2/fossil...done. [New LWP 1] [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 whereLoopAddAll (pBuilder=0xffbff280) at src/sqlite3.c:109401 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); (gdb) list 109396/* Loop over the tables in the join, from left to right */ 109397pNew = pBuilder-pNew; 109398whereLoopInit(pNew); 109399for(iTab=0, pItem=pTabList-a; iTabnTabList; iTab++, pItem++){ 109400 pNew-iTab = iTab; 109401 pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); Can you use the debugger to give us the value of pWInfo-sMaskSet please? Perhaps this is an alignment problem. Adding an extra line for debugging (and compiling with -O0 so it doesn't disappear) suggests the issue may be with pNew: pNew-iTab = iTab; +pNew-maskSelf = 1; pNew-maskSelf = getMask(pWInfo-sMaskSet, pItem-iCursor); $ gdb fossil core [...] Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 0x00177584 in whereLoopAddAll (pBuilder=0xffbfedc4) at src/sqlite3.c:109401 109401 pNew-maskSelf = 1; (gdb) (gdb) print pWInfo-sMaskSet $1 = (WhereMaskSet *) 0x256e34 (gdb) print pNew $2 = (WhereLoop *) 0x2570c4 (gdb) -- Edward Berner ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On Thu, Jul 18, 2013 at 9:54 AM, Edward Berner e...@bernerfam.com wrote: Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 0x00177584 in whereLoopAddAll (pBuilder=0xffbfedc4) at src/sqlite3.c:109401 109401 pNew-maskSelf = 1; (gdb) What does print pNew and print pNew-maskSelf show here? -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On 7/18/2013 7:07 AM, Richard Hipp wrote: On Thu, Jul 18, 2013 at 9:54 AM, Edward Berner e...@bernerfam.com mailto:e...@bernerfam.com wrote: Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 0x00177584 in whereLoopAddAll (pBuilder=0xffbfedc4) at src/sqlite3.c:109401 109401 pNew-maskSelf = 1; (gdb) What does print pNew and print pNew-maskSelf show here? Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 0x00177584 in whereLoopAddAll (pBuilder=0xffbfedc4) at src/sqlite3.c:109401 109401 pNew-maskSelf = 1; (gdb) print pNew $1 = (WhereLoop *) 0x2570c4 (gdb) print pNew-maskSelf $2 = (Bitmask *) 0x2570cc (gdb) -- Edward Berner ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On Thu, Jul 18, 2013 at 10:11 AM, Edward Berner e...@bernerfam.com wrote: On 7/18/2013 7:07 AM, Richard Hipp wrote: On Thu, Jul 18, 2013 at 9:54 AM, Edward Berner e...@bernerfam.commailto: e...@bernerfam.com wrote: Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 0x00177584 in whereLoopAddAll (pBuilder=0xffbfedc4) at src/sqlite3.c:109401 109401 pNew-maskSelf = 1; (gdb) What does print pNew and print pNew-maskSelf show here? Core was generated by `./fossil new t.fossil'. Program terminated with signal 10, Bus error. #0 0x00177584 in whereLoopAddAll (pBuilder=0xffbfedc4) at src/sqlite3.c:109401 109401 pNew-maskSelf = 1; (gdb) print pNew $1 = (WhereLoop *) 0x2570c4 Bingo. Notice that pNew is not 8-byte aligned. Looks like an SQLite bug. I'll investigate. Thanks for the diagnostics (gdb) print pNew-maskSelf $2 = (Bitmask *) 0x2570cc (gdb) -- Edward Berner __**_ fossil-users mailing list fossil-users@lists.fossil-scm.**org fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:**8080/cgi-bin/mailman/listinfo/**fossil-usershttp://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On Thu, Jul 18, 2013 at 2:12 AM, Edward Berner e...@bernerfam.com wrote: Hello, Using a recent trunk version of fossil, built with gcc on Solaris 10 on an UltraSPARC system, I get a bus error from fossil new: Please try again with the latest trunk version of Fossil and let me know whether or not you still see this problem. Tnx. -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] fossil new bus error on Solaris 10 SPARC with gcc
On 7/18/2013 7:54 AM, Richard Hipp wrote: On Thu, Jul 18, 2013 at 2:12 AM, Edward Berner e...@bernerfam.com mailto:e...@bernerfam.com wrote: Hello, Using a recent trunk version of fossil, built with gcc on Solaris 10 on an UltraSPARC system, I get a bus error from fossil new: Please try again with the latest trunk version of Fossil and let me know whether or not you still see this problem. Tnx. That fixed it. Thanks! -- Edward Berner ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users