Skip to contentSkip to conversation

bsd accounting lockups on smp 2.6.x machines

DISCUSSION John M Flinchbaugh 2 participants 2 messages Feb 25, 2004 – Apr 9, 2004

lore
Share & tools
lore
#0 lore raw

i originally reported kernel oopses and locks here against 2.6.1:
http://marc.theaimsgroup.com/?l=linux-kernel&m=107488761716255&w=2

then another person reported it against 2.6.2:
http://marc.theaimsgroup.com/?l=linux-kernel&m=107697407107875&w=2

i just saw it happen against 2.6.3, but i couldn't capture an oops. it's still out there. does anyone have any leads on what causes it? disabling bsd accounting seems to aleviate the crashes.

running tomcat's stop script (java processes) triggers it at times for me.

Signature · 3 lines
____________________}John Flinchbaugh{______________________
| [email protected]         http://www.hjsoft.com/~glynis/ |
~~Powered by Linux: Reboots are for hardware upgrades only~~
#1 lore raw
Quoted 7 lines · John M Flinchbaugh

i originally reported kernel oopses and locks here against 2.6.1:
http://marc.theaimsgroup.com/?l=linux-kernel&m=107488761716255&w=2

then another person reported it against 2.6.2:
http://marc.theaimsgroup.com/?l=linux-kernel&m=107697407107875&w=2

Quoted 7 lines

i just saw it happen against 2.6.3, but i couldn't capture an oops. it's still out there. does anyone have any leads on what causes it? disabling bsd accounting seems to aleviate the crashes.

running tomcat's stop script (java processes) triggers it at times for me.

Guys, are either of you still able to reproduce this oops in BSD accounting?

If so, would you be able to determine whether this fixes it? Thanks.

kernel/acct.c renamed from kernel/acct.c~acct-oops-fix +3 -0
diff -puN kernel/acct.c~acct-oops-fix kernel/acct.c
@@ -347,7 +347,10 @@ static void do_acct_process(long exitcod
 	/* we really need to bite the bullet and change layout */
 	ac.ac_uid = current->uid;
 	ac.ac_gid = current->gid;
+
+	read_lock(&tasklist_lock);	/* pin current->tty */
 	ac.ac_tty = current->tty ? old_encode_dev(tty_devnum(current->tty)) : 0;
+	read_unlock(&tasklist_lock);
 
 	ac.ac_flag = 0;
 	if (current->flags & PF_FORKNOEXEC)

_