Hi,
I've successfully updated the zorba package to the latest release. It builds properly for i686 and x86_64 but fails for armv7hl [1]. During the build process, the binary crashes with a segfault after it's called to create some additional xqdoc files.
Unfortunately, the ARM emulation is way to slow on my computers. Therefore, it's impossible for me to debug the issue in a timely manner. It would be great if someone with proper hardware could have a look into the bug and help to isolate it. Otherwise, I would exclude the ARM build for the zorba package. Here's the corresponding ARMTracker bug: https://bugzilla.redhat.com/show_bug.cgi?id=1069294
Thanks, Martin
[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=6559905
On Mon, Feb 24, 2014 at 06:20:58PM +0100, Martin Gieseking wrote:
Hi,
I've successfully updated the zorba package to the latest release. It builds properly for i686 and x86_64 but fails for armv7hl [1]. During the build process, the binary crashes with a segfault after it's called to create some additional xqdoc files.
Unfortunately, the ARM emulation is way to slow on my computers. Therefore, it's impossible for me to debug the issue in a timely manner. It would be great if someone with proper hardware could have a look into the bug and help to isolate it. Otherwise, I would exclude the ARM build for the zorba package. Here's the corresponding ARMTracker bug: https://bugzilla.redhat.com/show_bug.cgi?id=1069294
Thanks, Martin
[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=6559905
I'm just installing the build dependencies so I can see if I can reproduce it here. But as a first comment it's likely to be running out of memory. The builders have only 4GB of physical RAM.
Rich.
On Mon, Feb 24, 2014 at 06:20:58PM +0100, Martin Gieseking wrote:
[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=6559905
I'm building the Rawhide package on F20, which is slightly different from your build.
I get a failure in the same directory, on the same file. So it appears to be reproducible. I enabled core dumps and was able to collect a core file:
$ file core.2133 core.2133: ELF 32-bit LSB core file ARM, version 1 (SYSV), SVR4-style, from 'bin/zorba --omit-xml-declaration -f -q /home/rjones/d/fedora/zorba/master/zorba' $ gdb bin/zorba core.2133 Core was generated by `bin/zorba --omit-xml-declaration -f -q /home/rjones/d/fedora/zorba/master/zorba'. Program terminated with signal SIGSEGV, Segmentation fault. #0 __GI_strspn (s=s@entry=0x0, accept=accept@entry=0xb6d0576c ";") at strspn.c:33 33 for (p = s; *p != '\0'; ++p) (gdb) t a a bt
Thread 1 (Thread 0xb6f82000 (LWP 2133)): #0 __GI_strspn (s=s@entry=0x0, accept=accept@entry=0xb6d0576c ";") at strspn.c:33 #1 0xb442e804 in strtok (s=0x0, delim=0xb6d0576c ";") at strtok.c:45 #2 0xb65dd4e0 in zorba::append_env_var (env_var_name=<optimized out>, pathsVector=std::vector of length 3, capacity 4 = {...}) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/context/root_static_context.cpp:102 #3 0xb65de118 in zorba::root_static_context::init (this=this@entry=0xa8460) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/context/root_static_context.cpp:268 #4 0xb659f31c in zorba::GlobalEnvironment::init ( store=0xb6f61728 zorba::StoreManager::getStore()::store) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/system/globalenv.cpp:85 #5 0xb62eb2b0 in zorba::ZorbaImpl::init ( this=0xb6f5d85c zorba::Zorba::getInstance(void*)::lInstance, store=0xb6f61728 zorba::StoreManager::getStore()::store) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/api/zorbaimpl.cpp:103 #6 0xb62eaf04 in zorba::Zorba::getInstance ( store=0xb6f61728 zorba::StoreManager::getStore()::store, store@entry=0x10001 <compileAndExecute(zorba::Zorba*, ZorbaCMDProperties const&, zorba::SmartPtrzorba::StaticContext&, std::string const&, std::istream&, std::ostream&, TimingInfo&)+2092>) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/api/zorba.cpp:32 #7 0x0000beb0 in main (argc=<optimized out>, argv=<optimized out>) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/bin/zorbacmd.cpp:1034
HTH.
----------------------------------------------------------------------
By the way [small advert follows!] Cubietrucks are reasonably powerful ARM systems that you can buy worldwide for around US$99. They run Hans de Goede's Fedora Allwinner Remix straight out of the box. You will also need to buy a CP2102 serial cable (cost around $10), a microSDHD card, and optionally a 2.5" SATA drive. If you want a reasonably cheap way to debug these kinds of problems locally, this is the way to go.
Rich.
On Tue, Feb 25, 2014 at 01:18:57PM +0000, Richard W.M. Jones wrote:
Program terminated with signal SIGSEGV, Segmentation fault. #0 __GI_strspn (s=s@entry=0x0, accept=accept@entry=0xb6d0576c ";") at strspn.c:33 33 for (p = s; *p != '\0'; ++p) (gdb) t a a bt
Thread 1 (Thread 0xb6f82000 (LWP 2133)): #0 __GI_strspn (s=s@entry=0x0, accept=accept@entry=0xb6d0576c ";") at strspn.c:33 #1 0xb442e804 in strtok (s=0x0, delim=0xb6d0576c ";") at strtok.c:45 #2 0xb65dd4e0 in zorba::append_env_var (env_var_name=<optimized out>, pathsVector=std::vector of length 3, capacity 4 = {...}) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/context/root_static_context.cpp:102
Yeah, I debugged this last night, the problem is zorba isn't checking the return value of getenv, and as a result, passing a NULL ptr to strtok. Oddly, the optimized assembler versions in glibc for x86_64 happily just return NULL, whereas on ARM and other platforms, they dereference NULL and take a SIGSEGV.
Bringing this up with the glibc developers and scratch-building zorba: http://koji.fedoraproject.org/koji/taskinfo?taskID=6569756
--Kyle
#3 0xb65de118 in zorba::root_static_context::init (this=this@entry=0xa8460) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/context/root_static_context.cpp:268 #4 0xb659f31c in zorba::GlobalEnvironment::init ( store=0xb6f61728 zorba::StoreManager::getStore()::store) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/system/globalenv.cpp:85 #5 0xb62eb2b0 in zorba::ZorbaImpl::init ( this=0xb6f5d85c zorba::Zorba::getInstance(void*)::lInstance, store=0xb6f61728 zorba::StoreManager::getStore()::store) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/api/zorbaimpl.cpp:103 #6 0xb62eaf04 in zorba::Zorba::getInstance ( store=0xb6f61728 zorba::StoreManager::getStore()::store, store@entry=0x10001 <compileAndExecute(zorba::Zorba*, ZorbaCMDProperties const&, zorba::SmartPtrzorba::StaticContext&, std::string const&, std::istream&, std::ostream&, TimingInfo&)+2092>) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/api/zorba.cpp:32 #7 0x0000beb0 in main (argc=<optimized out>, argv=<optimized out>) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/bin/zorbacmd.cpp:1034
HTH.
By the way [small advert follows!] Cubietrucks are reasonably powerful ARM systems that you can buy worldwide for around US$99. They run Hans de Goede's Fedora Allwinner Remix straight out of the box. You will also need to buy a CP2102 serial cable (cost around $10), a microSDHD card, and optionally a 2.5" SATA drive. If you want a reasonably cheap way to debug these kinds of problems locally, this is the way to go.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/ _______________________________________________ arm mailing list arm@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/arm
On Tue, Feb 25, 2014 at 11:28:36AM -0500, Kyle McMartin wrote:
On Tue, Feb 25, 2014 at 01:18:57PM +0000, Richard W.M. Jones wrote:
Program terminated with signal SIGSEGV, Segmentation fault. #0 __GI_strspn (s=s@entry=0x0, accept=accept@entry=0xb6d0576c ";") at strspn.c:33 33 for (p = s; *p != '\0'; ++p) (gdb) t a a bt
Thread 1 (Thread 0xb6f82000 (LWP 2133)): #0 __GI_strspn (s=s@entry=0x0, accept=accept@entry=0xb6d0576c ";") at strspn.c:33 #1 0xb442e804 in strtok (s=0x0, delim=0xb6d0576c ";") at strtok.c:45 #2 0xb65dd4e0 in zorba::append_env_var (env_var_name=<optimized out>, pathsVector=std::vector of length 3, capacity 4 = {...}) at /home/rjones/d/fedora/zorba/master/zorba-2.9.1/src/context/root_static_context.cpp:102
Yeah, I debugged this last night, the problem is zorba isn't checking the return value of getenv, and as a result, passing a NULL ptr to strtok. Oddly, the optimized assembler versions in glibc for x86_64 happily just return NULL, whereas on ARM and other platforms, they dereference NULL and take a SIGSEGV.
You mean .. building on ARM has helped to shake out bugs in x86? The system works!
Rich.
Yeah, I debugged this last night, the problem is zorba isn't checking the return value of getenv, and as a result, passing a NULL ptr to strtok. Oddly, the optimized assembler versions in glibc for x86_64 happily just return NULL, whereas on ARM and other platforms, they dereference NULL and take a SIGSEGV.
Bringing this up with the glibc developers and scratch-building zorba: http://koji.fedoraproject.org/koji/taskinfo?taskID=6569756
Kyle and Richard,
thank you very much for isolating the bug and for providing a patch. It also makes zorba-3.0.0 build successfully on ARM. I really appreciate your help.
By the way [small advert follows!] Cubietrucks are reasonably powerful ARM systems that you can buy worldwide for around US$99. They run Hans de Goede's Fedora Allwinner Remix straight out of the box. You will also need to buy a CP2102 serial cable (cost around $10), a microSDHD card, and optionally a 2.5" SATA drive. If you want a reasonably cheap way to debug these kinds of problems locally, this is the way to go.
Also, thanks for this information. The Cubietruck kit looks promising and is available for about 90 Euros here in Germany. I think I'm going to get one in the next couple of days. :)
Thanks again, Martin
On Tue, Feb 25, 2014 at 07:28:15PM +0100, Martin Gieseking wrote:
[...]
By the way [small advert follows!] Cubietrucks are reasonably powerful ARM systems that you can buy worldwide for around US$99. They run Hans de Goede's Fedora Allwinner Remix straight out of the box. You will also need to buy a CP2102 serial cable (cost around $10), a microSDHD card, and optionally a 2.5" SATA drive. If you want a reasonably cheap way to debug these kinds of problems locally, this is the way to go.
Also, thanks for this information. The Cubietruck kit looks promising and is available for about 90 Euros here in Germany. I think I'm going to get one in the next couple of days. :)
I've written quite a bit about the Cubietruck on my blog:
http://rwmj.wordpress.com/?s=cubietruck
My particular interest is having KVM working on ARM. However even if you ignore virt, these are still relatively cheap and full-featured development boards. Make sure you get the CP2102 serial cable, and a micro SDHC card, and strongly consider a small (even second hand) 2.5" laptop SATA disk.
Rich.
Am 25.02.2014 22:28, schrieb Richard W.M. Jones:
Also, thanks for this information. The Cubietruck kit looks promising and is available for about 90 Euros here in Germany. I think I'm going to get one in the next couple of days. :)
I've written quite a bit about the Cubietruck on my blog:
http://rwmj.wordpress.com/?s=cubietruck
My particular interest is having KVM working on ARM. However even if you ignore virt, these are still relatively cheap and full-featured development boards. Make sure you get the CP2102 serial cable, and a micro SDHC card, and strongly consider a small (even second hand) 2.5" laptop SATA disk.
Thanks for the additional info and recommendations. Your blog posts and the corresponding comments will probably help me to get the Cubietruck running. Unfortunately, it seems to be sold out in Germany. At least no online store has it in stock. I just ordered one together with a CP2102 cable and it will hopefully be available in a couple of weeks.
Martin
On 26/02/14 07:45, Martin Gieseking wrote:
Am 25.02.2014 22:28, schrieb Richard W.M. Jones:
Also, thanks for this information. The Cubietruck kit looks promising and is available for about 90 Euros here in Germany. I think I'm going to get one in the next couple of days. :)
I've written quite a bit about the Cubietruck on my blog:
http://rwmj.wordpress.com/?s=cubietruck
My particular interest is having KVM working on ARM. However even if you ignore virt, these are still relatively cheap and full-featured development boards. Make sure you get the CP2102 serial cable, and a micro SDHC card, and strongly consider a small (even second hand) 2.5" laptop SATA disk.
Thanks for the additional info and recommendations. Your blog posts and the corresponding comments will probably help me to get the Cubietruck running. Unfortunately, it seems to be sold out in Germany. At least no online store has it in stock. I just ordered one together with a CP2102 cable and it will hopefully be available in a couple of weeks.
I've also written a bit about the Cubietruck some posts have a more debian focus others are general.
http://blog.night-shade.org.uk/category/hardware/cubietruck/