From: vv m <vv...@gm...> - 2014-06-17 15:51:22
|
STACK 1 - before core dump: --- Stack at this point: 2031 MemoryPool* p = MemoryPool::getContextPool(); (gdb) where #0 Firebird::AutoStorage::getAutoMemoryPool () at ../src/common/classes/alloc.cpp:2031 #1 0x4000000001263690:2 in inline Firebird::AutoStorage::AutoStorage() () at ../src/include/../common/classes/alloc.h:588 #2 0x4000000001263690:0 in inline Firebird::InlineStorage<unsigned short,(unsigned long)256>::InlineStorage() () at ../src/jrd/../jrd/../common/classes/array.h:42 #3 0x4000000001263690:0 in inline Firebird::Array<unsigned short,Firebird::InlineStorage<unsigned short,(unsigned long)256> >::Array() () at ../src/jrd/../jrd/../common/classes/array.h:83 #4 0x4000000001263680:0 in inline Firebird::HalfStaticArray<unsigned short,(unsigned long)256>::HalfStaticArray() (this=0x9fffffffffffe900) at ../src/jrd/../jrd/../common/classes/array.h:466 #5 0x4000000001263670:2 in inline Firebird::Aligner<unsigned short>::Aligner(unsigned char const*,unsigned int) (this=0x9fffffffffffe900, len=2, buf=0x4000000000500d92 "") at ../src/jrd/../common/classes/Aligner.h:95 #6 0x4000000001263660:0 in Firebird::IntlUtil::cvtUtf16ToUtf8 ( obj=0x6000000000100ff0, nSrc=2, ppSrc=0x4000000000500d92 "", nDest=4, pDest=0x6000000000100f08 "\376\355\253\355\376\355\253\355\376\355\253\355\376\355\253\355", err_code=0x9fffffffffffeb30, err_position=0x9fffffffffffeb34) at ../src/jrd/IntlUtil.cpp:385 #7 0x40000000008c24e0:0 in Jrd::CsConvert::convert (this=0x9fffffffffffeea0, srcLen=2, src=0x4000000000500d92 "", dstLen=4, ---Type <return> to continue, or q <return> to quit--- dst=0x6000000000100f08 "\376\355\253\355\376\355\253\355\376\355\253\355\376\355\253\355", badInputPos=0x0, ignoreTrailingSpaces=false) at ../src/jrd/../jrd/../jrd/CsConvert.h:199 #8 0x400000000112d730:2 in inline Jrd::CsConvert::convert(unsigned int,unsigned short const*,unsigned int,unsigned char*,unsigned int*,bool) () at ../src/jrd/../jrd/../jrd/CsConvert.h:89 #9 0x400000000112d5b0:1 in inline Jrd::CharSet::CharSet(unsigned short,charset*) () at ../src/jrd/../jrd/../jrd/CharSet.h:58 #10 0x400000000112d560:0 in inline MultiByteCharSet::MultiByteCharSet(unsigned short,charset*) (this=0x6000000000100ef0, _id=4, _cs=0x6000000000100f38) at ../src/jrd/CharSet.cpp:118 #11 0x400000000112d4a0:0 in Jrd::CharSet::createInstance ( pool=@0x60000000000f2d20, id=4, cs=0x6000000000100f38) at ../src/jrd/CharSet.cpp:246 #12 0x400000000126e040:0 in Firebird::IntlUtil::Utf8CharSet::Utf8CharSet ( this=0x6000000000100f38, pool=@0x60000000000f2d20) at ../src/jrd/IntlUtil.cpp:82 #13 0x400000000126e6f0:2 in inline Firebird::GlobalPtr<Firebird::IntlUtil::Utf8CharSet>::GlobalPtr() () at ../src/jrd/../jrd/../common/classes/init.h:127 #14 0x400000000126e5d0:2 in __sinit_IntlUtil_cpp_+0x112 () at ../src/jrd/IntlUtil.cpp:77 #15 0x9fffffffef7a8ce0:0 in EM_mark_BOS+0x50 () from /usr/lib/hpux64/dld.so (gdb) STACK 1 - after core dump --- Program received signal SIGSEGV, Segmentation fault si_code: 1 - SEGV_MAPERR - Address not mapped to object. Firebird::MemoryPool::getContextPool () at ../src/common/classes/alloc.cpp:299 299 { (gdb) where #0 Firebird::MemoryPool::getContextPool () at ../src/common/classes/alloc.cpp:299 #1 0x400000000058d480:0 in Firebird::AutoStorage::getAutoMemoryPool () at ../src/common/classes/alloc.cpp:2031 #2 0x40000000005bc190:2 in inline Firebird::AutoStorage::AutoStorage() () at ../src/include/../common/classes/alloc.h:588 #3 0x40000000005bc180:1 in inline Firebird::AbstractString::AbstractString() () at ../src/common/../common/../common/classes/fb_string.h:159 #4 0x40000000005bc170:1 in Firebird::StringBase<Firebird::PathNameComparator>::StringBase (this=0x9ffffffffdce5ef0) at ../src/common/../common/../common/classes/fb_string.h:609 #5 0x40000000005c15c0:0 in fb_utils::getPrefix ( No.Identifier_5=0x9ffffffffdce6420, prefType=fb_utils::FB_DIR_LOG, name=0x400000000033a6e0 "firebird.log") at ../src/common/utils.cpp:926 #6 0x40000000005fbde0:0 in gds__log ( text=0x4000000000322b60 "Assertion (%s) failure: %s %ld\n") at ../src/jrd/gds.cpp:1188 #7 0x400000000057f110:2 in inline Firebird::TlsValue<Firebird::MemoryPool*>::get() (this=0x60000000000d7540) at ../src/include/../common/classes/fb_tls.h:129 #8 0x400000000057f0b0:0 in Firebird::MemoryPool::getContextPool () at ../src/common/classes/alloc.cpp:300 #9 0x400000000058d480:0 in Firebird::AutoStorage::getAutoMemoryPool () at ../src/common/classes/alloc.cpp:2031 ---Type <return> to continue, or q <return> to quit--- #10 0x40000000005bc190:2 in inline Firebird::AutoStorage::AutoStorage() () at ../src/include/../common/classes/alloc.h:588 #11 0x40000000005bc180:1 in inline Firebird::AbstractString::AbstractString() () at ../src/common/../common/../common/classes/fb_string.h:159 #12 0x40000000005bc170:1 in Firebird::StringBase<Firebird::PathNameComparator>::StringBase (this=0x9ffffffffdce68b0) at ../src/common/../common/../common/classes/fb_string.h:609 #13 0x40000000005c15c0:0 in fb_utils::getPrefix ( No.Identifier_5=0x9ffffffffdce6de0, prefType=fb_utils::FB_DIR_LOG, name=0x400000000033a6e0 "firebird.log") at ../src/common/utils.cpp:926 #14 0x40000000005fbde0:0 in gds__log ( text=0x4000000000322b60 "Assertion (%s) failure: %s %ld\n") at ../src/jrd/gds.cpp:1188 #15 0x400000000057f110:2 in inline Firebird::TlsValue<Firebird::MemoryPool*>::get() (this=0x60000000000d7540) at ../src/include/../common/classes/fb_tls.h:129 #16 0x400000000057f0b0:0 in Firebird::MemoryPool::getContextPool () at ../src/common/classes/alloc.cpp:300 #17 0x400000000058d480:0 in Firebird::AutoStorage::getAutoMemoryPool () at ../src/common/classes/alloc.cpp:2031 #18 0x40000000005bc190:2 in inline Firebird::AutoStorage::AutoStorage() () at ../src/include/../common/classes/alloc.h:588 #19 0x40000000005bc180:1 in inline Firebird::AbstractString::AbstractString() () at ../src/common/../common/../common/classes/fb_string.h:159 ---Type <return> to continue, or q <return> to quit--- #20 0x40000000005bc170:1 in Firebird::StringBase<Firebird::PathNameComparator>::StringBase (this=0x9ffffffffdce7270) at ../src/common/../common/../common/classes/fb_string.h:609 #21 0x40000000005c15c0:0 in fb_utils::getPrefix ( No.Identifier_5=0x9ffffffffdce77a0, prefType=fb_utils::FB_DIR_LOG, name=0x400000000033a6e0 "firebird.log") at ../src/common/utils.cpp:926 #22 0x40000000005fbde0:0 in gds__log ( text=0x4000000000322b60 "Assertion (%s) failure: %s %ld\n") at ../src/jrd/gds.cpp:1188 #23 0x400000000057f110:2 in inline Firebird::TlsValue<Firebird::MemoryPool*>::get() (this=0x60000000000d7540) at ../src/include/../common/classes/fb_tls.h:129 #24 0x400000000057f0b0:0 in Firebird::MemoryPool::getContextPool () at ../src/common/classes/alloc.cpp:300 #25 0x400000000058d480:0 in Firebird::AutoStorage::getAutoMemoryPool () at ../src/common/classes/alloc.cpp:2031 #26 0x40000000005bc190:2 in inline Firebird::AutoStorage::AutoStorage() () at ../src/include/../common/classes/alloc.h:588 #27 0x40000000005bc180:1 in inline Firebird::AbstractString::AbstractString() () at ../src/common/../common/../common/classes/fb_string.h:159 #28 0x40000000005bc170:1 in Firebird::StringBase<Firebird::PathNameComparator>::StringBase (this=0x9ffffffffdce7c30) at ../src/common/../common/../common/classes/fb_string.h:609 #29 0x40000000005c15c0:0 in fb_utils::getPrefix ( ---Type <return> to continue, or q <return> to quit--- No.Identifier_5=0x9ffffffffdce8160, prefType=fb_utils::FB_DIR_LOG, name=0x400000000033a6e0 "firebird.log") at ../src/common/utils.cpp:926 #30 0x40000000005fbde0:0 in gds__log ( text=0x4000000000322b60 "Assertion (%s) failure: %s %ld\n") at ../src/jrd/gds.cpp:1188 #31 0x400000000057f110:2 in inline Firebird::TlsValue<Firebird::MemoryPool*>::get() (this=0x60000000000d7540) at ../src/include/../common/classes/fb_tls.h:129 #32 0x400000000057f0b0:0 in Firebird::MemoryPool::getContextPool () at ../src/common/classes/alloc.cpp:300 #33 0x400000000058d480:0 in Firebird::AutoStorage::getAutoMemoryPool () at ../src/common/classes/alloc.cpp:2031 #34 0x40000000005bc190:2 in inline Firebird::AutoStorage::AutoStorage() () at ../src/include/../common/classes/alloc.h:588 #35 0x40000000005bc180:1 in inline Firebird::AbstractString::AbstractString() () at ../src/common/../common/../common/classes/fb_string.h:159 #36 0x40000000005bc170:1 in Firebird::StringBase<Firebird::PathNameComparator>::StringBase (this=0x9ffffffffdce85f0) at ../src/common/../common/../common/classes/fb_string.h:609 #37 0x40000000005c15c0:0 in fb_utils::getPrefix ( No.Identifier_5=0x9ffffffffdce8b20, prefType=fb_utils::FB_DIR_LOG, name=0x400000000033a6e0 "firebird.log") at ../src/common/utils.cpp:926 #38 0x40000000005fbde0:0 in gds__log ( text=0x4000000000322b60 "Assertion (%s) failure: %s %ld\n") ---Type <return> to continue, or q <return> to quit--- --- |
From: Alex P. <pes...@ma...> - 2014-06-19 12:48:36
|
On 06/17/14 19:51, vv m wrote: > Hi All, > > I've built FB from the source code (v. 2.5.2.26540-0) on HP-UX IA64 > (Itanium). > > This is my setup: HP-UX ia64, HP C/aC++ B3910B A.06.25 > > My settings: > export CC=cc > export CXX=aCC > export CFLAGS=+DD64 > export CFLAGS=+DD64 > > ./configure --enable-debug=yes > > Resolving a few build issues, I've been able to build create_db, but > similar to a situation which I had building FB on AIX (see corresponding > discussion) it produced a core dump: > > Pid 14664 received a SIGSEGV for stack growth failure. > Possible causes: insufficient memory or swap space, > or stack size exceeded maxssiz. > > I checked corresponding system settings using kctune and swapinfo, and it > looked OK. > I started debugging and figure out that during creation of static object > GlobalPtr<IntlUtil::Utf8CharSet> IntlUtil::utf8CharSet > (.../jrd/IntlUtil.cpp), the assert fb_assert(keySet) is met at > .../common/classes/fb_tls.h:129 during a call of TLS_GET macro at > .../common/classes/alloc.cpp:300. > Then this assert is supposed to be stored into the log, and during that > TLS_GET called again, then, in turn assert happens again, etc. recursively. > Finally, it kills the stack (I've attached a file with stack details). > > In my understanding, it happens 'cause TLS_GET uses FB's own implementation > of TLS instead of the one provided by the system compiler. That's not FB's own, that's posix standard functions. But I agree that there was firebird bug, showing itself on RISC machines with compiler missing __thread support. > In file .../src/include/gen/autoconfig.h, corresponding macro is defined: > > /* Define it if compiler supports ISO syntax for thread-local storage */ > #define HAVE___THREAD 1 > > which means that the system supports it. > > Also, there is another comment in fb_tls.h: > > #if defined(HAVE___THREAD) > // Recent GCC supports __thread keyword. Sun compiler and HP-UX should have > it too > # define TLS_DECLARE(TYPE, NAME) __thread TYPE NAME > # define TLS_GET(NAME) NAME > > But all this is in contradiction with definition in file > .../src/common/classes/common.h: > > #if defined (__HP_aCC) > // aCC error, __thread can be used only with C-like structs > #undef HAVE___THREAD > #endif > > Having that, my suggestion was to comment the line "#undef HAVE___THREAD". > After that I've been able to finalize a build successfully and pass basic > tests. I've committed a fix for initial problem to B2_5. When you will be able to access snapshot (BTW, tomorrow you can get it from FB site) please also try clean build on HPUX if possible. |
From: vv m <vv...@gm...> - 2014-06-19 15:59:59
|
Still can't get the snapshot. I see "Generating snapshot..." and it takes forever. For sure, when I get it, I'll run builds on AIX and HP and let you know. Currently I'm working on build for Sun SPARC. One detail - I don't have automake installed on HP, so I used directly ./configure. Could it be the reason why HAVE___THREAD definition was missed? On Thu, Jun 19, 2014 at 8:48 AM, Alex Peshkoff <pes...@ma...> wrote: > On 06/17/14 19:51, vv m wrote: > > Hi All, > > > > I've built FB from the source code (v. 2.5.2.26540-0) on HP-UX IA64 > > (Itanium). > > > > This is my setup: HP-UX ia64, HP C/aC++ B3910B A.06.25 > > > > My settings: > > export CC=cc > > export CXX=aCC > > export CFLAGS=+DD64 > > export CFLAGS=+DD64 > > > > ./configure --enable-debug=yes > > > > Resolving a few build issues, I've been able to build create_db, but > > similar to a situation which I had building FB on AIX (see corresponding > > discussion) it produced a core dump: > > > > Pid 14664 received a SIGSEGV for stack growth failure. > > Possible causes: insufficient memory or swap space, > > or stack size exceeded maxssiz. > > > > I checked corresponding system settings using kctune and swapinfo, and it > > looked OK. > > I started debugging and figure out that during creation of static object > > GlobalPtr<IntlUtil::Utf8CharSet> IntlUtil::utf8CharSet > > (.../jrd/IntlUtil.cpp), the assert fb_assert(keySet) is met at > > .../common/classes/fb_tls.h:129 during a call of TLS_GET macro at > > .../common/classes/alloc.cpp:300. > > Then this assert is supposed to be stored into the log, and during that > > TLS_GET called again, then, in turn assert happens again, etc. > recursively. > > Finally, it kills the stack (I've attached a file with stack details). > > > > In my understanding, it happens 'cause TLS_GET uses FB's own > implementation > > of TLS instead of the one provided by the system compiler. > > That's not FB's own, that's posix standard functions. But I agree that > there was firebird bug, showing itself on RISC machines with compiler > missing __thread support. > > > In file .../src/include/gen/autoconfig.h, corresponding macro is defined: > > > > /* Define it if compiler supports ISO syntax for thread-local storage */ > > #define HAVE___THREAD 1 > > > > which means that the system supports it. > > > > Also, there is another comment in fb_tls.h: > > > > #if defined(HAVE___THREAD) > > // Recent GCC supports __thread keyword. Sun compiler and HP-UX should > have > > it too > > # define TLS_DECLARE(TYPE, NAME) __thread TYPE NAME > > # define TLS_GET(NAME) NAME > > > > But all this is in contradiction with definition in file > > .../src/common/classes/common.h: > > > > #if defined (__HP_aCC) > > // aCC error, __thread can be used only with C-like structs > > #undef HAVE___THREAD > > #endif > > > > Having that, my suggestion was to comment the line "#undef > HAVE___THREAD". > > After that I've been able to finalize a build successfully and pass basic > > tests. > > I've committed a fix for initial problem to B2_5. When you will be able > to access snapshot (BTW, tomorrow you can get it from FB site) please > also try clean build on HPUX if possible. > > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel > |
From: Alex P. <pes...@ma...> - 2014-06-20 06:32:12
|
On 06/19/14 19:59, vv m wrote: > Still can't get the snapshot. I see "Generating snapshot..." and it takes > forever. > For sure, when I get it, I'll run builds on AIX and HP and let you know. Can you try to svn co svn://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release > Currently I'm working on build for Sun SPARC. > > One detail - I don't have automake installed on HP, so I used directly > ./configure. Could it be the reason why HAVE___THREAD definition was missed? No, that's not a reason. And (as far as I remember) HAVE___THREAD is present in generated by configure autoconfig.h, but explicitly undefined in common.h. Anyway - use of configure from other system is absolutely correct. |
From: vv m <vv...@gm...> - 2014-06-20 19:19:30
|
It came to my mind because building on Sun, I had a bunch of problems using ./configure, including a core dump related with HAVE___THREAD. After switching to ./autogen.sh, I've got a working set of execs (I'll share results later). Here are notes about building Rel 59735 on HP. Actually, all issues (except the 1st one) I had also during build of 2.5.2.26540. 1) As I mentioned, I don't have automake*, etc. installed on this box, so I had to use ./configure. But it was not present in .../, so I've copied it from corresponding AIX build. Using ./configure also required to copy other 3 files from AIX into .../builds/make.new: config.sub, config.h.in and config.guess. After that, ./configure passed. 2) Error related with icu library (I had it during previous builds 2.5.2.26540 also): Warning: Found path 'uconvmsg_' in file name. Assuming compatibility (-E) mode. gmake[6]: Entering directory `/build/fasbuild/ws/TEST/Firebird-2.5.2.26540-0/extern/icu/source/extra/uconv' gmake[6]: *** No rule to make target `uconvmsg/uconvmsg_dat.o)', needed by `uconvmsg/libuconvmsg.a'. Stop. ... The following trick worked for me: I went to .../extern/icu/source and run ./configure --disable-extras gmake Then copied *.* from .../extern/icu/source/lib to .../gen/firebird/lib. Then went back to .../ and run gmake for the whole project. 3) Errors related with guid.h (I had it during previous builds 2.5.2.26540 also, this error doesn't happen on AIX, only warning): ---------------------------------------------- /../jrd/os/guid.h", line 51: warning #2064-D: declaration does not declare anything struct // Compatible with Win32 GUID struct layout. ^ "../src/include/../jrd/os/guid.h", line 52: warning #3055-D: types cannot be declared in anonymous unions { ^ "../src/jrd/os/posix/guid.cpp", line 73: error #2135: class "FB_GUID" has no member "data3" guid->data3 = (4 << 12) | (guid->data3 & 0xFFF); // version 4 ^ ... "../src/jrd/os/posix/guid.cpp", line 74: error #2135: class "FB_GUID" has no member "data4" guid->data4[0] = 0x80 | (guid->data4[0] & 0x3F); // variant ^ 4 errors detected in the compilation of "../src/jrd/os/posix/guid.cpp". ---------------------------------------------- I just commented struct { } (probably it could be embrased with #ifdef .../ #endif if it's for Windows compatibility): //struct // Compatible with Win32 GUID struct layout. //{ ULONG data1; USHORT data2; USHORT data3; UCHAR data4[8]; //}; According to the code which uses this structure, looks like it's safe. 4) ld: Unrecognized argument: +concatrpath (I had it during previous builds 2.5.2.26540 also): Looks like this linker option (+concatrpath) is valid for HP-UX PA RISC, but not IA64. To resolve, I just removed this part of linker flags definition: "-Wl,+concatrpath" in .../builds/posix/prefix.hpux_aCC and .../gen/make.platform 5) Error related with ./builds/posix/empty.vers (I had it during previous builds 2.5.2.26540 also): --- aCC +DD64 -Wl,-c,../builds/posix/empty.vers -D_REENTRANT -mt -Wl,+b,lib -Wl,+b,intl -AA +e ../temp/std/remote/server_stub.o -o ../gen/firebird/bin/fb_inet_server -L../gen/firebird/lib -lfbembed -lrt -latomic -lm -lcurses -licuuc -licudata -licui18n ld: I/O error, file "{": No such file or directory Fatal error. --- Again, looks like aCC doesn't understand it. As I did before, just commented the content of this file to resolve this error. I'm pretty sure that you would find more elegant ways to resolve these issues. Thanks, Vadim. On Fri, Jun 20, 2014 at 2:32 AM, Alex Peshkoff <pes...@ma...> wrote: > On 06/19/14 19:59, vv m wrote: > > Still can't get the snapshot. I see "Generating snapshot..." and it takes > > forever. > > For sure, when I get it, I'll run builds on AIX and HP and let you know. > > Can you try to > svn co svn:// > svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release > > > Currently I'm working on build for Sun SPARC. > > > > One detail - I don't have automake installed on HP, so I used directly > > ./configure. Could it be the reason why HAVE___THREAD definition was > missed? > > No, that's not a reason. And (as far as I remember) HAVE___THREAD is > present in generated by configure autoconfig.h, but explicitly undefined > in common.h. Anyway - use of configure from other system is absolutely > correct. > > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel > |