All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] Programs in guest segfault, amd64 host and guest
@ 2006-10-18 15:33 Jan Dittmer
  2006-10-18 19:09 ` Jeff Dike
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Dittmer @ 2006-10-18 15:33 UTC (permalink / raw)
  To: user-mode-linux-devel

- Guest 2.6.19-rc1-git11
- Host Debian 2.6.18-1-amd64
- Debian etch for host and guest
- both using ext3
- command to start the guest
./linux-2.6.19-rc1-git11 ubd0=umlblob.cow,etch-amd64.img \
    eth0=daemon,10:00:00:00:00:02,unix,/var/run/uml-utilities/uml_switch.ctl \
         mem=128M \
         con=null umid=umlprey \
         >/dev/null 2>&1 &


$ strace btlaunchmany /tmp/
...
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, 
-1, 0) = 0x41c4e000
mprotect(0x41c4e000, 4096, PROT_NONE)   = 0
clone(Process 484 attached
child_stack=0x4244e280, 
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED, 
parent_tidptr=0x4244e9f0, tls=0x4244e960, child_tidptr=0x4244e9f0) = 484
[pid   483] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid   484] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 484 detached
<... rt_sigprocmask resumed> NULL, 8)   = 0
+++ killed by SIGSEGV +++
Process 483 detached

$ strace mlnet -stdout
...
gettimeofday({1161185543, 817872}, NULL) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE|PROT_EXEC, 
MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 0) = 0x41ccd000
mprotect(0x41ccd000, 4096, PROT_NONE)   = 0
clone(child_stack=0x424cd270, 
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED, 
parent_tidptr=0x424cd9f0, tls=0x424cd960, child_tidptr=0x424cd9f0) = 502
gettimeofday({1161185543, 820912}, NULL) = 0
poll([{fd=7, events=POLLIN}, {fd=6, events=POLLIN}, {fd=5, events=POLLIN}, 
{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 5, 96) = -1 EINTR 
(Interrupted system call)
+++ killed by SIGSEGV +++
Process 501 detached

Additionally I'm having build failure compiling ARCH=um SUBARCH=i386.

Thanks for any pointers,

Jan


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Programs in guest segfault, amd64 host and guest
  2006-10-18 15:33 [uml-devel] Programs in guest segfault, amd64 host and guest Jan Dittmer
@ 2006-10-18 19:09 ` Jeff Dike
  2006-10-18 19:16   ` Jan Dittmer
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Dike @ 2006-10-18 19:09 UTC (permalink / raw)
  To: Jan Dittmer; +Cc: user-mode-linux-devel

On Wed, Oct 18, 2006 at 05:33:50PM +0200, Jan Dittmer wrote:
> clone(Process 484 attached
> child_stack=0x4244e280, 
> flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED, 
> parent_tidptr=0x4244e9f0, tls=0x4244e960, child_tidptr=0x4244e9f0) = 484
> [pid   483] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
> [pid   484] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> Process 484 detached
> <... rt_sigprocmask resumed> NULL, 8)   = 0
> +++ killed by SIGSEGV +++

I suspect it's due to UML/x86_64 having incomplete NPTL support,
although I've had almost no problems with up-to-date Fedora
filesystems on x86_64.  The one thing I do see is yum segfaulting
occassionally, but I haven't been able to tie that to NPTL.

				Jeff

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Programs in guest segfault, amd64 host and guest
  2006-10-18 19:09 ` Jeff Dike
@ 2006-10-18 19:16   ` Jan Dittmer
  2006-10-18 21:03     ` Nikola Ciprich
  2006-10-18 21:05     ` Jeff Dike
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Dittmer @ 2006-10-18 19:16 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel

Jeff Dike wrote:
> On Wed, Oct 18, 2006 at 05:33:50PM +0200, Jan Dittmer wrote:
>> clone(Process 484 attached
>> child_stack=0x4244e280, 
>> flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED, 
>> parent_tidptr=0x4244e9f0, tls=0x4244e960, child_tidptr=0x4244e9f0) = 484
>> [pid   483] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
>> [pid   484] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>> Process 484 detached
>> <... rt_sigprocmask resumed> NULL, 8)   = 0
>> +++ killed by SIGSEGV +++
> 
> I suspect it's due to UML/x86_64 having incomplete NPTL support,
> although I've had almost no problems with up-to-date Fedora
> filesystems on x86_64.  The one thing I do see is yum segfaulting
> occassionally, but I haven't been able to tie that to NPTL.

This is 100% reproducible here. Perfect test case. How to debug?

Jan

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Programs in guest segfault, amd64 host and guest
  2006-10-18 19:16   ` Jan Dittmer
@ 2006-10-18 21:03     ` Nikola Ciprich
  2006-10-18 21:05     ` Jeff Dike
  1 sibling, 0 replies; 7+ messages in thread
From: Nikola Ciprich @ 2006-10-18 21:03 UTC (permalink / raw)
  To: Jan Dittmer; +Cc: user-mode-linux-devel

try exporting LD_ASSUME_KERNEL=2.4.1 before executing Your application, 
to see if that works - this disables usage of NPTL
Jan Dittmer wrote:
> Jeff Dike wrote:
>   
>> On Wed, Oct 18, 2006 at 05:33:50PM +0200, Jan Dittmer wrote:
>>     
>>> clone(Process 484 attached
>>> child_stack=0x4244e280, 
>>> flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED, 
>>> parent_tidptr=0x4244e9f0, tls=0x4244e960, child_tidptr=0x4244e9f0) = 484
>>> [pid   483] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
>>> [pid   484] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>>> Process 484 detached
>>> <... rt_sigprocmask resumed> NULL, 8)   = 0
>>> +++ killed by SIGSEGV +++
>>>       
>> I suspect it's due to UML/x86_64 having incomplete NPTL support,
>> although I've had almost no problems with up-to-date Fedora
>> filesystems on x86_64.  The one thing I do see is yum segfaulting
>> occassionally, but I haven't been able to tie that to NPTL.
>>     
>
> This is 100% reproducible here. Perfect test case. How to debug?
>
> Jan
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
>   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Programs in guest segfault, amd64 host and guest
  2006-10-18 19:16   ` Jan Dittmer
  2006-10-18 21:03     ` Nikola Ciprich
@ 2006-10-18 21:05     ` Jeff Dike
  2006-10-18 21:25       ` Jan Dittmer
  1 sibling, 1 reply; 7+ messages in thread
From: Jeff Dike @ 2006-10-18 21:05 UTC (permalink / raw)
  To: Jan Dittmer; +Cc: user-mode-linux-devel

On Wed, Oct 18, 2006 at 09:16:14PM +0200, Jan Dittmer wrote:
> This is 100% reproducible here. Perfect test case. How to debug?

You want to dig into the code and see what's wrong?  Put a breakpoint
on the force_sig_info(SIGSEGV, ...) in segv().  Then find the faulting
instruction -
	RIP is regs.skas.regs[16]
	pid = cpu_tasks[0].pid
	Look in the host's /proc/$pid/maps for the page containing RIP
	add uml_physmem to the offset in column 3 - that's the
physical page containing RIP
	add the RIP page offset to that to get the actual physical
address for RIP
	disassemble the range of memory around it - I usually do 10 -
20 bytes before it to ~10 bytes after
	see that the asm looks sane, if not, bump the start of the
disassembly by a byte in either direction until it does
	see what the instruction at RIP is - if it involves a gs:
reference, then it's very likely a NPTL problem

If you don't want to do that, tell me what to yum, and how to run
whatever it is, and I'll look at it.

				Jeff

	

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Programs in guest segfault, amd64 host and guest
  2006-10-18 21:05     ` Jeff Dike
@ 2006-10-18 21:25       ` Jan Dittmer
  2006-10-20 16:33         ` Jeff Dike
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Dittmer @ 2006-10-18 21:25 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel

Jeff Dike wrote:
> On Wed, Oct 18, 2006 at 09:16:14PM +0200, Jan Dittmer wrote:
>> This is 100% reproducible here. Perfect test case. How to debug?
> 
> You want to dig into the code and see what's wrong?  Put a breakpoint
> on the force_sig_info(SIGSEGV, ...) in segv().  Then find the faulting
> instruction -
> 	RIP is regs.skas.regs[16]
> 	pid = cpu_tasks[0].pid
> 	Look in the host's /proc/$pid/maps for the page containing RIP
> 	add uml_physmem to the offset in column 3 - that's the
> physical page containing RIP
> 	add the RIP page offset to that to get the actual physical
> address for RIP
> 	disassemble the range of memory around it - I usually do 10 -
> 20 bytes before it to ~10 bytes after
> 	see that the asm looks sane, if not, bump the start of the
> disassembly by a byte in either direction until it does
> 	see what the instruction at RIP is - if it involves a gs:
> reference, then it's very likely a NPTL problem

Well tomorrow perhaps. I've very little time currently :-(

> If you don't want to do that, tell me what to yum, and how to run
> whatever it is, and I'll look at it.

As I wrote in the original message: Debian/etch amd64 host+guest,
running btlaunchmany (from the bittorrent package). I can put you
the compressed root + kernel somewhere if that helps. It's roughly
100mb.

Jan

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [uml-devel] Programs in guest segfault, amd64 host and guest
  2006-10-18 21:25       ` Jan Dittmer
@ 2006-10-20 16:33         ` Jeff Dike
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2006-10-20 16:33 UTC (permalink / raw)
  To: Jan Dittmer; +Cc: user-mode-linux-devel

On Wed, Oct 18, 2006 at 11:25:18PM +0200, Jan Dittmer wrote:
> As I wrote in the original message: Debian/etch amd64 host+guest,
> running btlaunchmany (from the bittorrent package). I can put you
> the compressed root + kernel somewhere if that helps. It's roughly
> 100mb.

Yeah, that would be useful.

				Jeff

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-20 16:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-18 15:33 [uml-devel] Programs in guest segfault, amd64 host and guest Jan Dittmer
2006-10-18 19:09 ` Jeff Dike
2006-10-18 19:16   ` Jan Dittmer
2006-10-18 21:03     ` Nikola Ciprich
2006-10-18 21:05     ` Jeff Dike
2006-10-18 21:25       ` Jan Dittmer
2006-10-20 16:33         ` Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.