Skip to contentSkip to conversation

__wrap_malloc compile error without CONFIG_MODE_TT

uml-devel Peter 3 participants 6 messages Nov 5, 2004 – Nov 10, 2004 User-mode Linux (UML)

lore
Share & tools
lore

Peter

author
#0 lore raw

Hi. I just compiled 2.6.9 + uml-2.6.9-bb1.patch.bz2 and got a compile error with CONFIG_MODE_TT turned off. Posting here in case it is of interest to anyone.

diff workingconfig brokenconfig

14c14,15
< CONFIG_MODE_TT=y
---

Quoted 2 lines

# CONFIG_MODE_TT is not set
# CONFIG_STATIC_LINK is not set

22d22
< # CONFIG_SMP is not set
276a277,279

Quoted 3 lines

# CONFIG_NET_SCH_CLK_JIFFIES is not set
# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
# CONFIG_NET_SCH_CLK_CPU is not set

LD lib/built-in.o

  AR      lib/lib.a
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1

arch/um/kernel/built-in.o(.text+0x1a5f): In function `__wrap_malloc':
arch/um/kernel/main.c:192: undefined reference to tracing_pid' arch/um/kernel/built-in.o(.text+0x1ade): In function __wrap_free':
arch/um/kernel/main.c:236: undefined reference to tracing_pid' arch/um/kernel/built-in.o(.text+0x1b21):arch/um/kernel/main.c:240: undefined reference to tracing_pid' arch/um/kernel/built-in.o(.text+0x6a7b): In function `sig_handler':
arch/um/kernel/trap_user.c:108: undefined reference to sig_handler_common_tt' arch/um/kernel/built-in.o(.text+0x6abe): In function alarm_handler':
arch/um/kernel/trap_user.c:121: undefined reference to sig_handler_common_tt' arch/um/kernel/built-in.o(.text+0x6a5a): In function usr2_handler':
arch/um/kernel/trap_user.c:80: undefined reference to syscall_handler_tt' arch/um/kernel/built-in.o(.text+0x72a3): In function not_dead_yet':
arch/um/kernel/umid.c:192: undefined reference to tracing_pid' arch/um/drivers/built-in.o(.text+0x36f8): In function register_winch':
arch/um/drivers/chan_user.c:153: undefined reference to `is_tracer_winch'
collect2: ld returned 1 exit status
KSYM .tmp_kallsyms1.S
nm: .tmp_vmlinux1: No such file or directory
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
arch/um/kernel/built-in.o(.text+0x1a5f): In function `__wrap_malloc':
arch/um/kernel/main.c:192: undefined reference to tracing_pid' arch/um/kernel/built-in.o(.text+0x1ade): In function __wrap_free':
arch/um/kernel/main.c:236: undefined reference to tracing_pid' arch/um/kernel/built-in.o(.text+0x1b21):arch/um/kernel/main.c:240: undefined reference to tracing_pid' arch/um/kernel/built-in.o(.text+0x6a7b): In function `sig_handler':
arch/um/kernel/trap_user.c:108: undefined reference to sig_handler_common_tt' arch/um/kernel/built-in.o(.text+0x6abe): In function alarm_handler':
arch/um/kernel/trap_user.c:121: undefined reference to sig_handler_common_tt' arch/um/kernel/built-in.o(.text+0x6a5a): In function usr2_handler':
arch/um/kernel/trap_user.c:80: undefined reference to syscall_handler_tt' arch/um/kernel/built-in.o(.text+0x72a3): In function not_dead_yet':
arch/um/kernel/umid.c:192: undefined reference to tracing_pid' arch/um/drivers/built-in.o(.text+0x36f8): In function register_winch':
arch/um/drivers/chan_user.c:153: undefined reference to `is_tracer_winch'
collect2: ld returned 1 exit status
make: *** [.tmp_vmlinux2] Error 1
make linux

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 3 lines · Peter

Hi. I just compiled 2.6.9 + uml-2.6.9-bb1.patch.bz2 and got a compile error with CONFIG_MODE_TT turned off. Posting here in case it is of interest to anyone.

This is the one you can fix with a make clean (yes, already seen with other versions, and I checked the error messages).

And no, UML does not pick up config option changes well - if you change them and don't do a make clean, you get to keep both pieces. Or better, some files are not recompiled - for instance, all ones ending in _user.c (in fact, it gives an undefined reference from trap_user.c). main.c also falls in this category.

Yes, it's a bug, but fixing it is complex, and requires a lot of engineering. I'm at work on this, but it will take time to be fixed.

Bye

Signature · 13 lines
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
author
#2 lore raw

[uml-devel] Re: 2.6.9-bb1, 2.4.27-bs1, SKAS3/2.6-V7 released

Hi. Host is 2.6.9-skas3-v7. Guest is linux.2.4.27-bs1. I restarted a UML guest 24 times ok. After that I got these two processes that won't die.

xxxxd  30282  0.0  0.1 132344 3988 ?       D    01:21   0:00 /home/umlusers/xxxxd.net/linux umid=leventd.net con=null con0=fd:
xxxxd  30284  0.0  0.1 132344 3988 ?       T    01:21   0:00  \_ /home/umlusers/xxxxd.net/linux umid=xxxxd.net con=null con0

I've sent them kill signals from 1 thru 64 (including, of course, SIGCONT) and neither process is interested in quitting.

I can't strace to the second process (attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted)

There is nothing happening on the strace of the first process.

Is there any more info I can provide that would be of use?

In the meantime, I'm taking this host kernel back to 2.6.8.1 to see if that is going to be any better. I have another server that I can 'play' with 2.6.9 later on if we can make some progress on this problem.

Cheers, Peter

Quoted 27 lines

From: Blaisorblade <blaisorblade_spam <at> yahoo.it>
Subject: 2.6.9-bb1, 2.4.27-bs1, SKAS3/2.6-V7 released
Newsgroups: gmane.linux.kernel, gmane.linux.uml.devel, gmane.linux.uml.user
Date: Thu, 04 Nov 2004 19:32:31 +0100

You can find all on http://www.user-mode-linux.org/~blaisorblade/.

The SKAS3/2.6-v7 was already released, but I probably forgot to announce it. So I'm announcing it now.

Changes in SKAS:
* echo 0 > /proc/sysemu on the guests works fine, finally!

Changes in both 2.6.9 and 2.4.27:
they run fine on 2.6.9 host kernels, without hanging at the exit.

Changes in 2.6.9 only:
included a large chunk of JDike tree (excluding all x86_64 related patches), and all the latest security patches from Bodo Stroesser; also it includes the -V7 skas patch in it.

Actually, however, to do this I had to include big, invasive patches from Jeff Dike's tree. I've done it because it's needed and because Bodo Stroesser worked with the incrementals very fine.

Changes in 2.4.27 only:

It's based on a fork from the official 2.4.24-1; the patches I've included come almost totally from there, but I dropped all the hostfs rewrite. I also included some incrementals, the one I thought safe.

Also, you can find on the page the instructions to avoid the "hwclock hang" in TT mode. I found the faulty patch, but it needs a more worse bug, which affects everyone running in TT mode on a 2.6 host, so it's included. You can revert the patch if you want, and if you have to run it on a 2.4 host. I sent a message about this about a week ago, but I got no answer.

Quoted 10 lines

Distribution:
* the patch are also in split-out form, both web-browsable and tarballed.
* md5sums are available (to test with "md5sum -c *.md5").

Any testing and report is welcome.

Bye

Signature · 2 lines
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw

Re: [uml-devel] Re: 2.6.9-bb1, 2.4.27-bs1, SKAS3/2.6-V7 released

Quoted 8 lines · Peter

Hi. Host is 2.6.9-skas3-v7. Guest is linux.2.4.27-bs1. I restarted a UML guest 24 times ok. After that I got these two processes that won't die.

xxxxd 30282 0.0 0.1 132344 3988 ? D 01:21 0:00
/home/umlusers/xxxxd.net/linux umid=leventd.net con=null con0=fd:
xxxxd 30284 0.0 0.1 132344 3988 ? T 01:21 0:00 \_
/home/umlusers/xxxxd.net/linux umid=xxxxd.net con=null con0

I.e. 24 restarts and only two dead processes, right? It means that the fix "normally" works. But those two processes are hanged for another host kernel bug, and this time a very bad one!

The first process is in "D" state.

If it stays that way, it will never die - and it also means you have had a kernel Oops or something like that - search /var/log/messages on the host and you'll find some text about that, which you should post (search "Oops" and you should find it). Btw, this is a host kernel bug, so you should probably also report it to LKML (post it here also, to get some more answers).

Also, could you post "ps -ef" output about this processes, if they are still alive? If not, the Oops text should be enough.

Quoted 7 lines

I've sent them kill signals from 1 thru 64 (including, of course, SIGCONT) and neither process is interested in quitting.

I can't strace to the second process (attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted)

There is nothing happening on the strace of the first process.

I guess that "strace" should even hang on the first process, since it has freezed this bad way.

Signature · 13 lines
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
author
#4 lore raw

Re: [uml-devel] Re: 2.6.9-bb1, 2.4.27-bs1, SKAS3/2.6-V7 released

There was no oops in /var/log/messages for that 'stuck' process.

A server reboot managed to get rid of that stuck process OK.

The host server is now up and running with a 2.6.8.1-skas3-v7 kernel. and the VPS survived 50 restarts ok.

Cheers, Peter

Quoted 13 lines · Blaisorblade
Quoted 9 lines · Peter

Hi. Host is 2.6.9-skas3-v7. Guest is linux.2.4.27-bs1. I restarted a UML guest 24 times ok. After that I got these two processes that won't die.

xxxxd 30282 0.0 0.1 132344 3988 ? D 01:21 0:00
/home/umlusers/xxxxd.net/linux umid=leventd.net con=null con0=fd:
xxxxd 30284 0.0 0.1 132344 3988 ? T 01:21 0:00 \_
/home/umlusers/xxxxd.net/linux umid=xxxxd.net con=null con0

Quoted 7 lines

I.e. 24 restarts and only two dead processes, right? It means that the fix "normally" works. But those two processes are hanged for another host kernel bug, and this time a very bad one!

The first process is in "D" state.

If it stays that way, it will never die - and it also means you have had a kernel Oops or something like that - search /var/log/messages on the host and you'll find some text about that, which you should post (search "Oops" and you should find it). Btw, this is a host kernel bug, so you should probably also report it to LKML (post it here also, to get some more answers).

Also, could you post "ps -ef" output about this processes, if they are still alive? If not, the Oops text should be enough.

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#5 lore raw

Re: [uml-devel] Re: 2.6.9-bb1, 2.4.27-bs1, SKAS3/2.6-V7 released

In reply to Blaisorblade
Quoted 17 lines · Peter
Quoted 8 lines

Hi. Host is 2.6.9-skas3-v7. Guest is linux.2.4.27-bs1. I restarted a UML guest 24 times ok. After that I got these two processes that won't die.

xxxxd 30282 0.0 0.1 132344 3988 ? D 01:21 0:00
/home/umlusers/xxxxd.net/linux umid=leventd.net con=null con0=fd:
xxxxd 30284 0.0 0.1 132344 3988 ? T 01:21 0:00 \_
/home/umlusers/xxxxd.net/linux umid=xxxxd.net con=null con0

I.e. 24 restarts and only two dead processes, right? It means that the fix "normally" works. But those two processes are hanged for another host kernel
bug, and this time a very bad one!

The first process is in "D" state.

Quoted 7 lines

If it stays that way, it will never die - and it also means you have had a kernel Oops or something like that - search /var/log/messages on the host and
you'll find some text about that, which you should post (search "Oops" and you should find it). Btw, this is a host kernel bug, so you should probably
also report it to LKML (post it here also, to get some more answers).

Network filesystems like nfs and samba is often a source for processes getting stuck in "D" state and with time affecting other processes due to deadlocks until the stuck processes times out where it is stuck (which with nfs can be MANY hours by experience when strange things have happened with the nfs-server)

Stian

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel