This is a blog about me, Seinfeld, okonomiyaki, japanese toilet seats, and other things of interest

Tuesday, January 20, 2009

Bizarre

Ever seen cp on Unix going in to an infinite loop and never returing while copying a tiny 2k file? I had no idea it was possible until half an hour ago. Came back to my desk after a nice cappucino and saw this:


PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1563 lolss 25 0 2728 832 640 R 100 0.0 0:12.99 cp


It never returns (had to kill it after waiting ten minutes)

I have no idea what's wrong. Only happens when I do the copy using system in a C-program that is started with my new favorite application, zzuf.

4 Comments:

Blogger aR!s said...

so, zzuf fuzzed yr cp?
(this sentence is hilarious so i had to type it, sorry - also in 4chan nomenclature your post and my reply can be severely misunderstood)

and in unrelated news, order Anathem now (if you haven't done already), but prepare for severe headaches... i am almost at the end (700+pp so far)

6:32 AM

 
Anonymous Anonymous said...

Try running zzuf in debug mode (-d) and you'll see what's causing the loop. Most likely it's because you're calling exec() for cp, which causes /proc/filesystems to be read, which is being zzuf-ed, leading to weird results. In that case, try running zzuf with -E /proc.

It might be a zzuf bug. On my Linux machine zzuf v0.12 is looping indefinitely while trying to zzuf-ify the line-by-line reading of /proc/filesystems. In fact, a simple C program that reads a text file line by line using getdelim also goes into an infinite loop when run under zzuf.

3662384e4a6c7a674b96f943cfe1228818f838b3

1:52 PM

 
Blogger lotek said...

Not so Anonymous, I think you are right! Thanks!

1:31 PM

 
Blogger lotek said...

Hmm, still doesn't work

4:27 PM

 

Post a Comment

<< Home