[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: qemu-m68k and prlimit64 - segfaults



On 11/20/2015 03:34 PM, Andreas Schwab wrote:
> John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> writes:
> 
>> Now, running this with strace, I made a suspicious observation which
>> might be related to the the segmentation fault:
>>
>> prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024,
>> rlim_max=RLIM64_INFINITY}) = 0
>> --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xef79c0d8} ---
> 
> Why do you think there is any relation between these two events?

I was guessing. I don't really know.

If you have any idea how to properly debug the issue, I would be very
glad.

Without the debug symbols, this is what gdb shows:

root@pacman:~> gdb /usr/bin/ruby2.2
GNU gdb (Debian 7.10-1) 7.10
Copyright (C) 2015 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 "m68k-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/ruby2.2...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/ruby2.2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/m68k-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xc01cc0ac in reserve_stack (limit=0xef8000d8 "", size=8384256) at
thread_pthread.c:690
690	thread_pthread.c: No such file or directory.
(gdb) bt
#0  0xc01cc0ac in reserve_stack (limit=0xef8000d8 "", size=8384256) at
thread_pthread.c:690
#1  0xc01ce9ec in ruby_init_stack (addr=0xeffff680) at thread_pthread.c:719
#2  0x8000071a in ?? ()
#3  0xeffff680 in ?? ()
#4  0xeffff68c in ?? ()
#5  0xeffff690 in ?? ()
#6  0x00000000 in ?? ()
(gdb)

>> Now, my question is: Is prlimit64 supposed to be used on 32-bit hardware
>> at all or might this be the result of ruby2.2 being compiled on
>> qemu-m68k on an amd64 host?
> 
> The prlimit function is implemented by the prlimit64 syscall.  There is
> no other way to implement it.

Ok.

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: