Skip to contentSkip to conversation

kernel loop with lseek + LFS on reiser partition.

DISCUSSION [email protected] 2 participants 3 messages Apr 22, 2002

lore
Share & tools
lore
#0 lore raw

Hi all,

I was just about to report a seek bug in samba-2.2.3a, when I wrote the attached sample program seeking in a file to position 128GB from the beginning and the ne writing "HEllo, world!" to that position. The prgram closes fd's 0,1,2 before doing all that, because I tried to simulate the fd numbers of the samba server. Hence, error reporting goes to syslog(2) instead of stderr. (I recently read about sparse files and decided to give them a try...; Program compiled LFS support; see comment in C-file)

Running the program under SuSE7.3 with the folowing two kernels lets the process starve in an infineite loop inside the kernel (99% kernel CPU):

linux-2.4.16 from SuSE
linux-2.4.18 with the speedup patches from this mailing list plus lvm-1.0.3

glibc-2.2.4 (SuSE 7.3)

No go with kill, kill -9...... Only reboot helps.

6GB Reiserfs partition on top of lvm, mount with -o conv.

Best regards,

Wolfgang

--
Dr. Wolfgang Glas EV-i Informationstechnologie
GmbH.
Geschäftsführer Sebastian-Kneipp-Weg 17
[email protected] A-6020 Innsbruck/Austria
phone: ++43-512-284883-2 fax: ++43-512-281624-31

#1 lore raw

Hello!

You seem to forgot to attach a program itself.

Bye,
Oleg

Quoted 35 lines · On Mon, Apr 22, 2002 at 10:28:05AM +0200, [email protected] wrote:

Hi all,

I was just about to report a seek bug in samba-2.2.3a, when I wrote the attached sample program seeking in a file to position 128GB from the beginning and the ne writing "HEllo, world!" to that position. The prgram closes fd's 0,1,2 before doing all that, because I tried to simulate the fd numbers of the samba server. Hence, error reporting goes to syslog(2) instead of stderr. (I recently read about sparse files and decided to give them a try...; Program compiled LFS support; see comment in C-file)

Running the program under SuSE7.3 with the folowing two kernels lets the process starve in an infineite loop inside the kernel (99% kernel CPU):

linux-2.4.16 from SuSE
linux-2.4.18 with the speedup patches from this mailing list plus lvm-1.0.3

glibc-2.2.4 (SuSE 7.3)

No go with kill, kill -9...... Only reboot helps.

6GB Reiserfs partition on top of lvm, mount with -o conv.

Best regards,

Wolfgang

--
Dr. Wolfgang Glas EV-i Informationstechnologie
GmbH.

Gesch?ftsf?hrer                          Sebastian-Kneipp-Weg 17
[email protected]                    A-6020 Innsbruck/Austria
phone: ++43-512-284883-2                 fax: ++43-512-281624-31
#2 lore raw
In reply to [email protected]

Hello!

Quoted 2 lines · On Mon, Apr 22, 2002 at 10:28:05AM +0200, [email protected] wrote:

Running the program under SuSE7.3 with the folowing two kernels lets the process starve in an infineite loop inside the kernel (99% kernel CPU):

Ok, now having done more research, I must say it is not infinite loop
in fact:
green@angband:~/work/bugs> gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -o t testprg.c testprg.c: In function `main':
testprg.c:47: warning: use of l' length character with f' type character
testprg.c:54: warning: control reaches end of non-void function
green@angband:~/work/bugs> time ./t

real    6m20.958s
user    0m0.000s
sys     6m22.430s

I think this is because of expanding-truncate patch.
So, the real bug is this process cannot get interrupted until finished which opens a window for resource-eating.

Quoted 1 line

No go with kill, kill -9...... Only reboot helps.

How long have you tried to wait?

Bye,
Oleg