Problems with UML on Debian Sarge 64 host
Hi there,
In my continuing saga (which some are becoming familiar with) to get UML 2.6.x working at all I have been given access to another machine to develop on and my old machine is going to disappear.
This machine is Debian Sarge with gcc 3.3.5 on an AMD64 with 32 bit userspace although 64 bit compiles can also occur.
I am doing all my UML builds with ARCH=um SUBARCH=i386 at this point in time.
The problem is that my bootup dies very early on and this is the total output:
Checking for /proc/mm...not found
Checking PROT_EXEC mmap in /tmp...OK
tracing thread pid = 20981OP_FORK failed to attach pid
I suspect that this is something to do with my mixed 32/64 bit environment but I am not sure... Can anybody shed some light on this?
BTW I have also written a patch which I think is worth submitting into the kernel tree as it gives better debugging of error messages in arch/um/kernel/tt/tracer.c for where my process is dying.
When I run with my patch it shows that it is dying on the PTRACE_ATTACH with an error EPERM but I can run other processes etc like gdb which attach to processes.
Any help would be greatly appreciated.
Ian
um/kernel/tt/tracer.c renamed from um/kernel/tt/tracer.c.sav +10 -7
@@ -68,14 +68,17 @@void attach_process (int pid) { -if ((ptrace (PTRACE_ATTACH , pid,0 ,0 ) <0 ) || - (ptrace (PTRACE_CONT , pid,0 ,0 ) <0 )) -tracer_panic ("OP_FORK failed to attach pid" ); +int err; + +if (!(err =ptrace (PTRACE_ATTACH , pid,0 ,0 ))) +tracer_panic ("OP_FORK: PTRACE_ATTACH failed, pid = %d, err = %d\n" , pid, -err); +if (!(err =ptrace (PTRACE_CONT , pid,0 ,0 ))) +tracer_panic ("OP_FORK: PTRACE_CONT failed, pid = %d, err = %d\n" , pid, -err);wait_for_stop (pid,SIGSTOP ,PTRACE_CONT ,NULL ); -if (ptrace (PTRACE_OLDSETOPTIONS , pid,0 , (void *)PTRACE_O_TRACESYSGOOD ) <0 ) -tracer_panic ("OP_FORK: PTRACE_SETOPTIONS failed, errno = %d" , errno); -if (ptrace (PTRACE_CONT , pid,0 ,0 ) <0 ) -tracer_panic ("OP_FORK failed to continue process" ); +if (!(err =ptrace (PTRACE_OLDSETOPTIONS , pid,0 , (void *)PTRACE_O_TRACESYSGOOD ))) +tracer_panic ("OP_FORK: PTRACE_SETOPTIONS failed, pid = %d, err = %d\n" , pid, -err); +if (!(err =ptrace (PTRACE_CONT , pid,0 ,0 ))) +tracer_panic ("OP_FORK: PTRACE_CONT (2) failed, pid = %d, err = %d\n" , pid, -err); }void tracer_panic (char *format, ...)
Forgot to say that I have tested with 2.6.11.4 and -bs3, also 2.6.12-rc2. Also attempted 2.6.12-rc2 with development patch but this won't compile at present as per earlier message.
Quoted 24 lines · Ian McDonald
Hi there,
In my continuing saga (which some are becoming familiar with) to get UML 2.6.x working at all I have been given access to another machine to develop on and my old machine is going to disappear.
This machine is Debian Sarge with gcc 3.3.5 on an AMD64 with 32 bit userspace although 64 bit compiles can also occur.
I am doing all my UML builds with ARCH=um SUBARCH=i386 at this point in time.
The problem is that my bootup dies very early on and this is the total output:
Checking for/proc/mm...notfound
CheckingPROT_EXECmmap in /tmp...OK
tracing thread pid = 20981OP_FORKfailed to attach pidI suspect that this is something to do with my mixed 32/64 bit environment but I am not sure... Can anybody shed some light on this?
BTW I have also written a patch which I think is worth submitting into the kernel tree as it gives better debugging of error messages in
arch/um/kernel/tt/tracer.cfor where my process is dying.
Quoted 10 lines
When I run with my patch it shows that it is dying on the
PTRACE_ATTACHwith an error EPERM but I can run other processes etc like gdb which attach to processes.Any help would be greatly appreciated.
Ian
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&opÌk
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 12 lines · Ian McDonald
Hi there,
In my continuing saga (which some are becoming familiar with) to get UML 2.6.x working at all I have been given access to another machine to develop on and my old machine is going to disappear.
This machine is Debian Sarge with gcc 3.3.5 on an AMD64 with 32 bit userspace although 64 bit compiles can also occur.
I am doing all my UML builds with ARCH=um SUBARCH=i386 at this point in time.
Quoted 8 lines
The problem is that my bootup dies very early on and this is the total
output: Checking for/proc/mm...notfound
CheckingPROT_EXECmmap in /tmp...OK
tracing thread pid = 20981OP_FORKfailed to attach pidI suspect that this is something to do with my mixed 32/64 bit environment but I am not sure... Can anybody shed some light on this?
I've seen that *sometimes* too on 64-bit envs., tried doing a "setarch i386 linux" or something like that, to force a 32-bit emulation?
At least sometimes it *does* make a difference.
Quoted 7 lines
BTW I have also written a patch which I think is worth submitting into the kernel tree as it gives better debugging of error messages in
arch/um/kernel/tt/tracer.cfor where my process is dying.When I run with my patch it shows that it is dying on the
PTRACE_ATTACHwith an error EPERM but I can run other processes etc like gdb which attach to processes.
Tried disabling the ptrace proxy in compilation, as the first thing?
Remember me and I'll go merging this patchlet (it's just matter of not forgetting this).
Quoted 1 line
Any help would be greatly appreciated.
I hope I can help on this...
Quoted 1 line
Ian
Signature · 16 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Comments inline
Quoted 19 lines · Blaisorblade
Quoted 17 lines · Ian McDonald
Hi there,
In my continuing saga (which some are becoming familiar with) to get UML 2.6.x working at all I have been given access to another machine to develop on and my old machine is going to disappear.
This machine is Debian Sarge with gcc 3.3.5 on an AMD64 with 32 bit userspace although 64 bit compiles can also occur.
I am doing all my UML builds with ARCH=um SUBARCH=i386 at this point in time.
The problem is that my bootup dies very early on and this is the total
output: Checking for/proc/mm...notfound
CheckingPROT_EXECmmap in /tmp...OK
tracing thread pid = 20981OP_FORKfailed to attach pid
Quoted 6 lines
Quoted 2 lines
I suspect that this is something to do with my mixed 32/64 bit environment but I am not sure... Can anybody shed some light on this?
I've seen that *sometimes* too on 64-bit envs., tried doing a "setarch i386 linux" or something like that, to force a 32-bit emulation?
setarch isn't on this machine and I can't find the equivalent command for sarge.
Quoted 2 lines
Tried disabling the ptrace proxy in compilation, as the first thing?
Tried that and no difference. Note that 2.6.11.x with bs4 doesn't compile with this option showing unless you set FRAME_POINTER to n. You get an error such as:
kernel/built-in.o(.text+0x83f4): In function `profile_tick':kernel/profile.c:387: undefined reference to `profile_pc'
The only way I could find to set this option to n was hacking the autoconf.h file...
So still no 32 bit UML... will try 64 bit (once I get access to the 64 bit compiler) and see if I can get that to work....
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&opÌk
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 12 lines · Ian McDonald
Comments inline
Quoted 8 lines · Blaisorblade
Quoted 7 lines · Ian McDonald
Hi there,
The problem is that my bootup dies very early on and this is the total
output: Checking for/proc/mm...notfound
CheckingPROT_EXECmmap in /tmp...OK
tracing thread pid = 20981OP_FORKfailed to attach pid
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I suspect that this is something to do with my mixed 32/64 bit environment but I am not sure... Can anybody shed some light on this?
I've seen that *sometimes* too on 64-bit envs., tried doing a "setarch i386 linux" or something like that, to force a 32-bit emulation?
setarch isn't on this machine and I can't find the equivalent command for sarge.
Tried installing the needed package? On SUSE it's called "linux32".
Also, tried compiling UML itself on a real 32-bit box (with static linking, obviously)?
Quoted 8 lines
Quoted 1 line
Tried disabling the ptrace proxy in compilation, as the first thing?
Tried that and no difference. Note that 2.6.11.x with bs4 doesn't compile with this option showing unless you set
FRAME_POINTERto n. You get an error such as:kernel/built-in.o(.text+0x83f4): In function `profile_tick':
kernel/profile.c:387: undefined reference to `profile_pc'
Hmm, interesting... However, the more likely culprit is CONFIG_SMP:
include/asm-i386/ptrace.h
#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) extern unsigned long profile_pc(struct pt_regs *regs); #else
#define profile_pc(regs) instruction_pointer(regs) #endifinstruction_pointer is defined, profile_pc is not.
Quoted 2 lines
The only way I could find to set this option to n was hacking the
autoconf.hfile...
Disable CONFIG_DEBUG_INFO and FRAME_POINTER should become 'n'.
Quoted 2 lines
So still no 32 bit UML... will try 64 bit (once I get access to the 64 bit compiler) and see if I can get that to work....
Let me recall: you *did* succeed on your older fully-32bit Debian Woody system, right? Or did I leave something unfixed behind?
Signature · 17 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 15 lines
Comments inline
Quoted 14 lines · Blaisorblade
Quoted 12 lines · Ian McDonald
Quoted 10 lines
Hi there,
The problem is that my bootup dies very early on and this is the total
output: Checking for/proc/mm...notfound
CheckingPROT_EXECmmap in /tmp...OK
tracing thread pid = 20981OP_FORKfailed to attach pidI suspect that this is something to do with my mixed 32/64 bit environment but I am not sure... Can anybody shed some light on this?
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
I've seen that *sometimes* too on 64-bit envs., tried doing a "setarch i386 linux" or something like that, to force a 32-bit emulation?
setarch isn't on this machine and I can't find the equivalent command for sarge.
Tried installing the needed package? On SUSE it's called "linux32".
The debian implementation has a 32 bit user space but it is picking up 64 bit for UML but just override with SUBARCH=i386.
I don't have root access to this box.
Interestingly enough it has now started working apart from some COW backing store issues which I have to get the system administrator to fix. I changed nothing but notice that the host kernel has changed from 2.6.8 to 2.6.11.7 so something in host kernel may well have fixed my issue! (which I have no control over).
Quoted 4 lines
Also, tried compiling UML itself on a real 32-bit box (with static linking, obviously)?
Yes - work.
Quoted 9 lines
Quoted 8 lines
Quoted 1 line
Tried disabling the ptrace proxy in compilation, as the first thing?
Tried that and no difference. Note that 2.6.11.x with bs4 doesn't compile with this option showing unless you set
FRAME_POINTERto n. You get an error such as:kernel/built-in.o(.text+0x83f4): In function `profile_tick':
kernel/profile.c:387: undefined reference to `profile_pc'Hmm, interesting... However, the more likely culprit is
CONFIG_SMP:
Tried it with CONFIG_SMP off and it resolved the issue.
Quoted 10 lines
include/asm-i386/ptrace.h#if
defined(CONFIG_SMP)&&defined(CONFIG_FRAME_POINTER)extern unsigned longprofile_pc(struct pt_regs *regs); #else
#defineprofile_pc(regs)instruction_pointer(regs)#endifinstruction_pointeris defined,profile_pcis not.
Quoted 8 lines
Quoted 2 lines
The only way I could find to set this option to n was hacking the
autoconf.hfile...Disable
CONFIG_DEBUG_INFOandFRAME_POINTERshould become 'n'.Quoted 2 lines
So still no 32 bit UML... will try 64 bit (once I get access to the 64 bit compiler) and see if I can get that to work....
Let me recall: you *did* succeed on your older fully-32bit Debian Woody system, right? Or did I leave something unfixed behind?
Yes I did succeed on my 32 bit Woody but that machine is being turned off in next couple of weeks :-(
The UML appears now to be working (once I can do more tests) on 64 bit once host kernel was upgraded to 2.6.11.7 (guess is 2.6.11.4+bs4 32 bit).
Thanks for your help. Unfortunately I don't have much time to help write patches at present or too many tests as my UML testing has slowed down my project and I have acquired two dedicated machines to help me out... I will certainly try to help though whenever I get bored (which is quite often!)
Regards,
Ian
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 7 lines · Ian McDonald
Quoted 5 lines
Comments inline
Also, tried compiling UML itself on a real 32-bit box (with static linking, obviously)?
Yes - work.
What I really meant was whether that UML, compiled on that environemnt, works in that situation - however this is no more relevant, since it was solved the other way.
Quoted 7 lines
Yes I did succeed on my 32 bit Woody but that machine is being turned off in next couple of weeks :-(
The UML appears now to be working (once I can do more tests) on 64 bit once host kernel was upgraded to 2.6.11.7 (guess is 2.6.11.4+bs4 32 bit).
Quoted 5 lines
Thanks for your help. Unfortunately I don't have much time to help write patches at present or too many tests as my UML testing has slowed down my project and I have acquired two dedicated machines to help me out... I will certainly try to help though whenever I get bored (which is quite often!)
Ok, don't worry and thanks a lot!
Good bye
Signature · 16 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel