Skip to contentSkip to conversation

2.4.4 fork() problems (maybe)

DISCUSSION Magnus Naeslund(f) 5 participants 8 messages May 5, 2001 – May 6, 2001

lore
Share & tools
lore
#0 lore raw

Hello, I saw that there was something changed on how fork() works, and wonder if this could be the cause my problem.
When i do a "su - <user>" it just hangs.
When i run strace on it i see that it forks and wait()s on the child.

Sometimes when i strace the su command it succeeds to give me a shell, sometimes not.
But it allways fails when i don't strace it.

Magnus Naeslund

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Programmer/Networker [|] Magnus Naeslund
PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#1 lore raw

* Magnus Naeslund(f) schrieb am 05.05.01 um 21:07 Uhr:

Quoted 9 lines

Hello, I saw that there was something changed on how fork() works, and wonder if this could be the cause my problem.
When i do a "su - <user>" it just hangs.
When i run strace on it i see that it forks and wait()s on the child.

Sometimes when i strace the su command it succeeds to give me a shell, sometimes not.
But it allways fails when i don't strace it.

Hi Magnus,

use 2.4.5-pre1 instead, Linus has undone the fork()-change for some reason ;-)

Cheers
-Marc

Signature · 4 lines
+-O . . . o . . . O . . . o . . . O . . .  ___  . . . O . . . o .-+
| Ein neuer Service von Links2Linux.de:   /  o\   RPMs for SuSE   |
| --> PackMan! <-- naeheres unter        |   __|   and  others    |
| http://packman.links2linux.de/ . . . O  \__\  . . . O . . . O . |
#3 lore raw
In reply to Magnus Naeslund(f)
Quoted 3 lines · Marc Schiffbauer

use 2.4.5-pre1 instead, Linus has undone the fork()-change for some reason ;-)

2.4.5-pre1 has it's own problems -

Probably better to use 2.4.4-ac5 instead.

cu

jjs

#4 lore raw
In reply to Magnus Naeslund(f)
Quoted 8 lines · Magnus Naeslund(f)

Hello, I saw that there was something changed on how fork() works, and wonder if this could be the cause my problem.
When i do a "su - <user>" it just hangs.
When i run strace on it i see that it forks and wait()s on the child.

Sometimes when i strace the su command it succeeds to give me a shell, sometimes not.
But it allways fails when i don't strace it.

2.4.4 has some problems with fork() but your problem seems to be something else. Are you using RedHat 7.1? (Or whatever it was the latest...) The su-acting-weird problem has been reported before and was traced to some PAM problems. Try to download some upgrades from RedHat, maybe it will help.

Signature · 1 line
marko
#2 lore raw
In reply to Marc Schiffbauer

Given the problems found by the fork change, would it possibly be worth making the fork behavior a compile time option (with a big warning that child-first behavior is known to break some software)

that way people who are running software without the bugs can gain the performance advantage and people can then test other software to discover what has bugs in it and then fix the software so that the change can be made permanent in a future release.

I also ran into one additional piece of software that appears to be stopped by the fork change. The Citrix ICA client (essentially remote display for a multi-use win NT box) locks up a few seconds after the mouse it moved.

David Lang

Quoted 36 lines · Marc Schiffbauer

Date: Sat, 5 May 2001 21:37:44 +0200
From: Marc Schiffbauer <[email protected]>
To: linux-kernel <[email protected]>
Subject: Re: 2.4.4 fork() problems (maybe)

* Magnus Naeslund(f) schrieb am 05.05.01 um 21:07 Uhr:

Quoted 9 lines

Hello, I saw that there was something changed on how fork() works, and wonder if this could be the cause my problem.
When i do a "su - <user>" it just hangs.
When i run strace on it i see that it forks and wait()s on the child.

Sometimes when i strace the su command it succeeds to give me a shell, sometimes not.
But it allways fails when i don't strace it.

Hi Magnus,

use 2.4.5-pre1 instead, Linus has undone the fork()-change for some reason ;-)

Cheers
-Marc

--

+-O . . . o . . . O . . . o . . . O . . .  ___  . . . O . . . o .-+
| Ein neuer Service von Links2Linux.de:   /  o\   RPMs for SuSE   |
| --> PackMan! <-- naeheres unter        |   __|   and  others    |
| http://packman.links2linux.de/ . . . O  \__\  . . . O . . . O . |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#5 lore raw
In reply to Magnus Naeslund(f)

From: "Marko Kreen" <[email protected]>

Quoted 10 lines · Magnus Naeslund(f)
Quoted 8 lines

Hello, I saw that there was something changed on how fork() works, and wonder if this could be the cause my problem.
When i do a "su - <user>" it just hangs.
When i run strace on it i see that it forks and wait()s on the child.

Sometimes when i strace the su command it succeeds to give me a shell, sometimes not.
But it allways fails when i don't strace it.

Quoted 9 lines

2.4.4 has some problems with fork() but your problem seems to be something else. Are you using RedHat 7.1? (Or whatever it was the latest...) The su-acting-weird problem has been reported before and was traced to some PAM problems. Try to download some upgrades from RedHat, maybe it will help.

Signature · 1 line
marko

No i use redhat 6.2 (on a alpha system).
It works fine with 2.4.3, which i am running now ( i backed out 2.4.4 ).

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Programmer/Networker [|] Magnus Naeslund
PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw
In reply to Magnus Naeslund(f)
Quoted 7 lines · Magnus Naeslund(f)

From: "Marko Kreen" <[email protected]>

Quoted 3 lines · Magnus Naeslund(f)
Quoted 2 lines

When i do a "su - <user>" it just hangs.
When i run strace on it i see that it forks and wait()s on the child.

No i use redhat 6.2 (on a alpha system).
It works fine with 2.4.3, which i am running now ( i backed out 2.4.4 ).

Could you try 2.4.5-pre1? If that too works then the problem quite possibly was indeed fork() child-first change. If not, well, then it gets interesting...

Signature · 1 line
marko
#7 lore raw
In reply to Magnus Naeslund(f)

From: "Marko Kreen" <[email protected]>

Quoted 5 lines · Magnus Naeslund(f)
Quoted 4 lines

From: "Marko Kreen" <[email protected]>

Quoted 3 lines · Magnus Naeslund(f)
Quoted 2 lines

When i do a "su - <user>" it just hangs.
When i run strace on it i see that it forks and wait()s on the

child.

Quoted 8 lines
Quoted 3 lines

No i use redhat 6.2 (on a alpha system).
It works fine with 2.4.3, which i am running now ( i backed out 2.4.4 ).

Could you try 2.4.5-pre1? If that too works then the problem quite possibly was indeed fork() child-first change. If not, well, then it gets interesting...

I can confirm that 2.4.5pre1 does NOT have this problem at all. Now everything works as it should.
I'll run this until next stable, and will report any trouble.

Quoted 2 lines

--
marko

Magnus Naeslund

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Programmer/Networker [|] Magnus Naeslund
PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-