* [uml-devel] Problems with UML on Debian Sarge 64 host
@ 2005-04-14 4:25 Ian McDonald
2005-04-14 4:27 ` [uml-devel] " Ian McDonald
2005-04-14 21:07 ` [uml-devel] " Blaisorblade
0 siblings, 2 replies; 8+ messages in thread
From: Ian McDonald @ 2005-04-14 4:25 UTC (permalink / raw)
To: UML Developer
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
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 = 20981
OP_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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tracer.diff --]
[-- Type: text/x-patch; name="tracer.diff", Size: 1249 bytes --]
--- arch/um/kernel/tt/tracer.c.sav 2005-04-14 15:02:50.000000000 +1200
+++ arch/um/kernel/tt/tracer.c 2005-04-14 15:45:13.151868552 +1200
@@ -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, ...)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [uml-devel] Re: Problems with UML on Debian Sarge 64 host
2005-04-14 4:25 [uml-devel] Problems with UML on Debian Sarge 64 host Ian McDonald
@ 2005-04-14 4:27 ` Ian McDonald
2005-04-14 21:07 ` [uml-devel] " Blaisorblade
1 sibling, 0 replies; 8+ messages in thread
From: Ian McDonald @ 2005-04-14 4:27 UTC (permalink / raw)
To: UML Developer
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.
On 14/04/05, Ian McDonald <imcdnzl@gmail.com> wrote:
> 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 = 20981
> OP_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
>
>
>
-------------------------------------------------------
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_id\x14396&opÌk
_______________________________________________
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] 8+ messages in thread
* Re: [uml-devel] Problems with UML on Debian Sarge 64 host
2005-04-14 4:25 [uml-devel] Problems with UML on Debian Sarge 64 host Ian McDonald
2005-04-14 4:27 ` [uml-devel] " Ian McDonald
@ 2005-04-14 21:07 ` Blaisorblade
2005-04-15 4:56 ` Ian McDonald
1 sibling, 1 reply; 8+ messages in thread
From: Blaisorblade @ 2005-04-14 21:07 UTC (permalink / raw)
To: user-mode-linux-devel, Ian McDonald
On Thursday 14 April 2005 06:25, Ian McDonald wrote:
> 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 = 20981
> OP_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?
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.
> 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.
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).
> Any help would be greatly appreciated.
I hope I can help on this...
> Ian
--
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] Problems with UML on Debian Sarge 64 host
2005-04-14 21:07 ` [uml-devel] " Blaisorblade
@ 2005-04-15 4:56 ` Ian McDonald
2005-04-19 16:05 ` Blaisorblade
0 siblings, 1 reply; 8+ messages in thread
From: Ian McDonald @ 2005-04-15 4:56 UTC (permalink / raw)
To: Blaisorblade; +Cc: user-mode-linux-devel
Comments inline
On 15/04/05, Blaisorblade <blaisorblade@yahoo.it> wrote:
> On Thursday 14 April 2005 06:25, Ian McDonald wrote:
> > 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 = 20981
> > OP_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?
>
> 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 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_id\x14396&opÌk
_______________________________________________
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] 8+ messages in thread
* Re: [uml-devel] Problems with UML on Debian Sarge 64 host
[not found] <CBELIFGMBIEPIEOFCJFAMEFLCAAA.brocka@sterlingcgi.com>
@ 2005-04-17 17:32 ` Blaisorblade
0 siblings, 0 replies; 8+ messages in thread
From: Blaisorblade @ 2005-04-17 17:32 UTC (permalink / raw)
To: Anthony Brock, user-mode-linux-devel
On Friday 15 April 2005 08:42, Anthony Brock wrote:
> Blaisor,
> Do you have an evaluation SKAS patch available for 64-bit Linux (2.6.11) on
> the AMD Opteron? Or has this project taken a back seat to other tasks?
Yes to both question, i.e. we are not yet there. I actually *did* a port to
64-bit, which is -v9-pre1, and it compiles, at least it did yesterday (maybe
my local tree had some changes from the released patch). Somebody reported it
does not compile, however.
The real problem is that it does not work yet (aka I cannot make it work on my
box), and I don't know why.
I already had done the port at 2.6.8.1 time and it had the same problem. And
actually, I'm busy with development (and at the very moment too busy even to
do a lot of development).
> I'm almost ready to start testing this configuration if one is available.
--
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] Problems with UML on Debian Sarge 64 host
2005-04-15 4:56 ` Ian McDonald
@ 2005-04-19 16:05 ` Blaisorblade
2005-04-20 1:51 ` Ian McDonald
0 siblings, 1 reply; 8+ messages in thread
From: Blaisorblade @ 2005-04-19 16:05 UTC (permalink / raw)
To: Ian McDonald; +Cc: user-mode-linux-devel
On Friday 15 April 2005 06:56, Ian McDonald wrote:
> Comments inline
>
> On 15/04/05, Blaisorblade <blaisorblade@yahoo.it> wrote:
> > On Thursday 14 April 2005 06:25, Ian McDonald wrote:
> > > Hi there,
> > > 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 = 20981
> > > OP_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?
> >
> > 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)?
> > 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'
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)
#endif
instruction_pointer is defined, profile_pc is not.
> The only way I could find to set this option to n was hacking the
> autoconf.h file...
Disable CONFIG_DEBUG_INFO and FRAME_POINTER should become 'n'.
> 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?
--
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] Problems with UML on Debian Sarge 64 host
2005-04-19 16:05 ` Blaisorblade
@ 2005-04-20 1:51 ` Ian McDonald
2005-04-21 15:47 ` Blaisorblade
0 siblings, 1 reply; 8+ messages in thread
From: Ian McDonald @ 2005-04-20 1:51 UTC (permalink / raw)
To: Blaisorblade; +Cc: user-mode-linux-devel
> Comments inline
> >
> > On 15/04/05, Blaisorblade <blaisorblade@yahoo.it> wrote:
> > > On Thursday 14 April 2005 06:25, Ian McDonald wrote:
> > > > Hi there,
>
> > > > 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 = 20981
> > > > OP_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?
> > >
> > > 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).
>
> Also, tried compiling UML itself on a real 32-bit box (with static linking,
> obviously)?
>
Yes - work.
> > > 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'
> Hmm, interesting... However, the more likely culprit is CONFIG_SMP:
Tried it with CONFIG_SMP off and it resolved the issue.
>
> 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)
> #endif
> instruction_pointer is defined, profile_pc is not.
>
> > The only way I could find to set this option to n was hacking the
> > autoconf.h file...
> Disable CONFIG_DEBUG_INFO and FRAME_POINTER should become 'n'.
>
> > 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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] Problems with UML on Debian Sarge 64 host
2005-04-20 1:51 ` Ian McDonald
@ 2005-04-21 15:47 ` Blaisorblade
0 siblings, 0 replies; 8+ messages in thread
From: Blaisorblade @ 2005-04-21 15:47 UTC (permalink / raw)
To: Ian McDonald; +Cc: user-mode-linux-devel
On Wednesday 20 April 2005 03:51, Ian McDonald wrote:
> > 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.
> 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!)
Ok, don't worry and thanks a lot!
Good bye
--
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-04-20 15:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-14 4:25 [uml-devel] Problems with UML on Debian Sarge 64 host Ian McDonald
2005-04-14 4:27 ` [uml-devel] " Ian McDonald
2005-04-14 21:07 ` [uml-devel] " Blaisorblade
2005-04-15 4:56 ` Ian McDonald
2005-04-19 16:05 ` Blaisorblade
2005-04-20 1:51 ` Ian McDonald
2005-04-21 15:47 ` Blaisorblade
[not found] <CBELIFGMBIEPIEOFCJFAMEFLCAAA.brocka@sterlingcgi.com>
2005-04-17 17:32 ` Blaisorblade
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.