From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@9fans.net
Subject: [9fans] Lock loop in malloc()
Date: Mon, 25 Jul 2011 15:58:37 +0200 [thread overview]
Message-ID: <20110725135837.GC27739@fangle.proxima.alt.za> (raw)
While attempting to compile Bison (yeah, still gnawing at that
bone!) I have managed to jam cpp more or less solid. That's compiling
scan-code-c.c which reduces to compiling scan-code.c.
However, it does not seem to be Bison that's at fault: it seems that an
invocation of alloc() tries to set a lock and never succeeds or gives up.
This is a summary, with some help from acid, subject to some very limited
knowledge on my part:
term% acid 3208
/proc/3208/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: lstk()
sleep()+0x7 /sys/src/libc/9syscall/sleep.s:5
lock(lk=0x1f2f8)+0xb7 /sys/src/libc/port/lock.c:25
plock(p=0x18310)+0x16 /sys/src/libc/port/malloc.c:81
poolalloc(p=0x18310,n=0x20)+0xf /sys/src/libc/port/pool.c:1223
malloc(size=0x18)+0x1c /sys/src/libc/port/malloc.c:207
domalloc(size=0x18)+0xf /sys/src/cmd/cpp/cpp.c:271
lookup(tp=0xab4a8,install=0x1)+0x74 /sys/src/cmd/cpp/nlist.c:213
dodefine(trp=0xdfffeeac)+0x40 /sys/src/cmd/cpp/macro.c:23
control(trp=0xdfffeeac)+0x4b2 /sys/src/cmd/cpp/cpp.c:133
process(trp=0xdfffeeac)+0xec /sys/src/cmd/cpp/cpp.c:70
main(argc=0xb,argv=0xdfffef0c)+0x8a /sys/src/cmd/cpp/cpp.c:35
_main+0x31 /sys/src/libc/386/main9.s:16
acid: lstk()
sleep()+0x7 /sys/src/libc/9syscall/sleep.s:5
lock(lk=0x1f2f8)+0xb7 /sys/src/libc/port/lock.c:25
i=0x3e8
plock(p=0x18310)+0x16 /sys/src/libc/port/malloc.c:81
pv=0x1f2f8
poolalloc(p=0x18310,n=0x20)+0xf /sys/src/libc/port/pool.c:1223
v=0x1928
malloc(size=0x18)+0x1c /sys/src/libc/port/malloc.c:207
v=0x18310
domalloc(size=0x18)+0xf /sys/src/cmd/cpp/cpp.c:271
p=0x0
lookup(tp=0xab4a8,install=0x1)+0x74 /sys/src/cmd/cpp/nlist.c:213
h=0x6f
np=0x1
dodefine(trp=0xdfffeeac)+0x40 /sys/src/cmd/cpp/macro.c:23
dots=0x0
tp=0xab4a8
np=0x27100
args=0x3e
narg=0x204b6
err=0x6
atp=0x27140
def=0x3876
tap=0x204b6
control(trp=0xdfffeeac)+0x4b2 /sys/src/cmd/cpp/cpp.c:133
tp=0xab498
np=0x27100
process(trp=0xdfffeeac)+0xec /sys/src/cmd/cpp/cpp.c:70
anymacros=0x80000020
main(argc=0xb,argv=0xdfffef0c)+0x8a /sys/src/cmd/cpp/cpp.c:35
ebuf=0x3a707063
tr=0xab498
_main+0x31 /sys/src/libc/386/main9.s:16
acid:
I've no idea how to track this problem down, let alone fix it. But this
problem is reproducible, albeit not using a small code base. It is
mildly possible that my Plan 9 installation is not altogether pristine
and is causing this situation, but I can't think how.
++L
next reply other threads:[~2011-07-25 13:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-25 13:58 Lucio De Re [this message]
2011-07-25 14:40 ` erik quanstrom
2011-07-25 14:42 ` Russ Cox
2011-07-25 15:17 ` Lucio De Re
2011-07-25 16:12 ` Russ Cox
2011-07-25 17:51 ` erik quanstrom
2011-07-25 19:31 ` Russ Cox
2011-07-26 1:38 ` erik quanstrom
2011-07-26 1:41 ` erik quanstrom
2011-07-26 1:56 ` Russ Cox
[not found] ` <CADSkJJUmVYNdy_sUqqM34xdXD9CiWyUUEr89uxouAJ0ydVLpHQ@mail.gmail.c>
2011-07-26 4:01 ` erik quanstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110725135837.GC27739@fangle.proxima.alt.za \
--to=lucio@proxima.alt.za \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).