All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [parisc-linux] pppd, pthread and hppa-linux question?
  2003-02-10 16:55 [parisc-linux] pppd, pthread and hppa-linux question? Joel Soete
@ 2003-02-10 16:13 ` Randolph Chung
  2003-02-10 17:57   ` Joel Soete
  2003-02-10 19:46   ` Carlos O'Donell
  2003-02-10 17:32 ` John David Anglin
  1 sibling, 2 replies; 9+ messages in thread
From: Randolph Chung @ 2003-02-10 16:13 UTC (permalink / raw)
  To: Joel Soete; +Cc: parisc-linux

> All seems to work fine, never the less I notice some pppd messages which
> I do not noticed on my i386 Debian GNU/Linux box:
> ...
> Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable
> Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily unavailable

this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need
to probably fix this in glibc.... let's add it to Carlos' todo list! :-)

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [parisc-linux] pppd, pthread and hppa-linux question?
@ 2003-02-10 16:55 Joel Soete
  2003-02-10 16:13 ` Randolph Chung
  2003-02-10 17:32 ` John David Anglin
  0 siblings, 2 replies; 9+ messages in thread
From: Joel Soete @ 2003-02-10 16:55 UTC (permalink / raw)
  To: parisc-linux

Hi all,

Since a month, I use ppp to have an external ISP connection (to have additional
rsync and cvs).

All seems to work fine, never the less I notice some pppd messages which
I do not noticed on my i386 Debian GNU/Linux box:
...
Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable
Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily unavailable
...
(there are so many that it become annoying :()

Well, analysing sources, it seems to come from thread? 
Is there some known pb regarding hppa-linux thread implementation (kernel,
glibc, pppd, ...)?

Thanks in advance for help,
    Joel



---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [parisc-linux] pppd, pthread and hppa-linux question?
  2003-02-10 16:55 [parisc-linux] pppd, pthread and hppa-linux question? Joel Soete
  2003-02-10 16:13 ` Randolph Chung
@ 2003-02-10 17:32 ` John David Anglin
  2003-02-10 17:42   ` Joel Soete
  1 sibling, 1 reply; 9+ messages in thread
From: John David Anglin @ 2003-02-10 17:32 UTC (permalink / raw)
  To: Joel Soete; +Cc: parisc-linux

> Well, analysing sources, it seems to come from thread? 
> Is there some known pb regarding hppa-linux thread implementation (kernel,
> glibc, pppd, ...)?

Yes.  There have been issues with locking in glibc wrt threads.  Also,
the functions in atomicity.h are not atomic.  There may also be problems
in the kernel, particularly SMP.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [parisc-linux] pppd, pthread and hppa-linux question?
  2003-02-10 17:32 ` John David Anglin
@ 2003-02-10 17:42   ` Joel Soete
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Soete @ 2003-02-10 17:42 UTC (permalink / raw)
  To: John David Anglin; +Cc: parisc-linux

>
>> Well, analysing sources, it seems to come from thread? 
>> Is there some known pb regarding hppa-linux thread implementation (kernel,
>> glibc, pppd, ...)?
>
>Yes.  There have been issues with locking in glibc wrt threads.  Also,
>the functions in atomicity.h are not atomic.  There may also be problems
>in the kernel, particularly SMP.
>
Ha ok, I will so wait.

Thanks to all,
    Joel


---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [parisc-linux] pppd, pthread and hppa-linux question?
  2003-02-10 16:13 ` Randolph Chung
@ 2003-02-10 17:57   ` Joel Soete
  2003-02-10 18:16     ` Joel Soete
  2003-02-10 19:46   ` Carlos O'Donell
  1 sibling, 1 reply; 9+ messages in thread
From: Joel Soete @ 2003-02-10 17:57 UTC (permalink / raw)
  To: Randolph Chung; +Cc: parisc-linux


>> All seems to work fine, never the less I notice some pppd messages which
>> I do not noticed on my i386 Debian GNU/Linux box:
>> ...
>> Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable
>> Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily unavailable
>
>this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need
>to probably fix this in glibc.... let's add it to Carlos' todo list! :-)
>

Hmm just: a quick look in src and effectively in mainly pppd/sys-linux.c
test errno != EWOULDBLOCK (for sys-sunos4.c we met more (errno != EAGAIN
&& errno != EWOULDBLOCK) 
I am curious if some change occurs about this in cvs?

Thanks,
    Joel


---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [parisc-linux] pppd, pthread and hppa-linux question?
  2003-02-10 17:57   ` Joel Soete
@ 2003-02-10 18:16     ` Joel Soete
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Soete @ 2003-02-10 18:16 UTC (permalink / raw)
  To: Randolph Chung; +Cc: parisc-linux

>
>>> All seems to work fine, never the less I notice some pppd messages which
>>> I do not noticed on my i386 Debian GNU/Linux box:
>>> ...
>>> Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable
>>> Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily
unavailable
>>
>>this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need
>>to probably fix this in glibc.... let's add it to Carlos' todo list! :-)
>>
>
... sys-sunos4.c we meet more (errno != EAGAIN && errno != EWOULDBLOCK) 

In cvs, the same for sys-aix4.c and sys-osf.c; could I safely try the same
here?

Joel


---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [parisc-linux] pppd, pthread and hppa-linux question?
  2003-02-10 16:13 ` Randolph Chung
  2003-02-10 17:57   ` Joel Soete
@ 2003-02-10 19:46   ` Carlos O'Donell
  2003-02-11  6:30     ` Joel Soete
  1 sibling, 1 reply; 9+ messages in thread
From: Carlos O'Donell @ 2003-02-10 19:46 UTC (permalink / raw)
  To: Randolph Chung; +Cc: Joel Soete, parisc-linux

On Mon, Feb 10, 2003 at 08:13:04AM -0800, Randolph Chung wrote:
> > All seems to work fine, never the less I notice some pppd messages which
> > I do not noticed on my i386 Debian GNU/Linux box:
> > ...
> > Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable
> > Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily unavailable
> 
> this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need
> to probably fix this in glibc.... let's add it to Carlos' todo list! :-)

It's already in my TODO :)

-- snip --
- EWOULDBLOCK emulation
        = Is EWOULDBLOCK emulation required?
        = What happens if we alias EWOULDBLOCK as EAGAIN
        = from the kernel hearders?
        - Break HPUX compat?
-- snip --

As JDA notes we still have broken atomic functions in atomicity. Which
we are planning to fix with a light weight syscall.

c.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [parisc-linux] pppd, pthread and hppa-linux question?
  2003-02-10 19:46   ` Carlos O'Donell
@ 2003-02-11  6:30     ` Joel Soete
  2003-02-11 19:00       ` Joel Soete
  0 siblings, 1 reply; 9+ messages in thread
From: Joel Soete @ 2003-02-11  6:30 UTC (permalink / raw)
  To: Carlos O'Donell, Randolph Chung; +Cc: parisc-linux

Carlos,

>
>On Mon, Feb 10, 2003 at 08:13:04AM -0800, Randolph Chung wrote:
>> > All seems to work fine, never the less I notice some pppd messages which
>> > I do not noticed on my i386 Debian GNU/Linux box:
>> > ...
>> > Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable
>> > Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily
>unavailable
>> 
>> this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need
>> to probably fix this in glibc.... let's add it to Carlos' todo list! :-)
>
>It's already in my TODO :)
>
>-- snip --
>- EWOULDBLOCK emulation
>        = Is EWOULDBLOCK emulation required?
>        = What happens if we alias EWOULDBLOCK as EAGAIN
>        = from the kernel hearders?
>        - Break HPUX compat?
>-- snip --
>
>As JDA notes we still have broken atomic functions in atomicity. Which
>we are planning to fix with a light weight syscall.
>
Thanks for advises,
    Joel


---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [parisc-linux] pppd, pthread and hppa-linux question?
  2003-02-11  6:30     ` Joel Soete
@ 2003-02-11 19:00       ` Joel Soete
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Soete @ 2003-02-11 19:00 UTC (permalink / raw)
  To: Carlos O'Donell, Randolph Chung; +Cc: parisc-linux

Hi all,

>
>>
>>On Mon, Feb 10, 2003 at 08:13:04AM -0800, Randolph Chung wrote:
>>> > All seems to work fine, never the less I notice some pppd messages
which
>>> > I do not noticed on my i386 Debian GNU/Linux box:
>>> > ...
>>> > Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable
>>> > Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily
>>unavailable
>>> 
>>> this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need
>>> to probably fix this in glibc.... let's add it to Carlos' todo list!
:-)
>>
>>It's already in my TODO :)
>>
>>-- snip --
>>- EWOULDBLOCK emulation
>>        = Is EWOULDBLOCK emulation required?
>>        = What happens if we alias EWOULDBLOCK as EAGAIN
>>        = from the kernel hearders?
>>        - Break HPUX compat?
>>-- snip --
>>
>>As JDA notes we still have broken atomic functions in atomicity. Which
>>we are planning to fix with a light weight syscall.
>>
Awaiting this Carlos work, I suggest following workaround:

--- ppp-2.4.1.uus.orig/pppd/sys-linux.c
+++ ppp-2.4.1.uus/pppd/sys-linux.c
@@ -929,7 +933,7 @@
 	    fd = ppp_dev_fd;
     }
     if (write(fd, p, len) < 0) {
-	if (errno == EWOULDBLOCK || errno == ENOBUFS
+	if (errno == EWOULDBLOCK || errno == EAGAIN || errno == ENOBUFS
 	    || errno == ENXIO || errno == EIO || errno == EINTR)
 	    warn("write: warning: %m (%d)", errno);
 	else
@@ -993,7 +997,8 @@
     nr = -1;
     if (ppp_fd >= 0) {
 	nr = read(ppp_fd, buf, len);
-	if (nr < 0 && errno != EWOULDBLOCK && errno != EIO && errno != EINTR)
+	if (nr < 0 && errno != EWOULDBLOCK && errno !=EAGAIN \
+                   && errno != EIO && errno != EINTR)
 	    error("read: %m");
 	if (nr < 0 && errno == ENXIO)
 	    return 0;
@@ -1001,7 +1006,8 @@
     if (nr < 0 && new_style_driver && ifunit >= 0) {
 	/* N.B. we read ppp_fd first since LCP packets come in there. */
 	nr = read(ppp_dev_fd, buf, len);
-	if (nr < 0 && errno != EWOULDBLOCK && errno != EIO && errno != EINTR)
+	if (nr < 0 && errno != EWOULDBLOCK && errno !=EAGAIN \
+                   && errno != EIO && errno != EINTR)
 	    error("read /dev/ppp: %m");
 	if (nr < 0 && errno == ENXIO)
 	    return 0;
@@ -1035,7 +1041,7 @@
     if (n == 0)
 	fatal("eof on loopback");
 
-    if (errno != EWOULDBLOCK)
+    if (errno != EWOULDBLOCK && errno != EAGAIN)
 	fatal("read from loopback: %m(%d)", errno);
 
     return rv;

It seems to me to avoid to much annoying messages.

Do you think I woul have to open a pr near debian maintainer pkg?

Joel


---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-02-11 19:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-10 16:55 [parisc-linux] pppd, pthread and hppa-linux question? Joel Soete
2003-02-10 16:13 ` Randolph Chung
2003-02-10 17:57   ` Joel Soete
2003-02-10 18:16     ` Joel Soete
2003-02-10 19:46   ` Carlos O'Donell
2003-02-11  6:30     ` Joel Soete
2003-02-11 19:00       ` Joel Soete
2003-02-10 17:32 ` John David Anglin
2003-02-10 17:42   ` Joel Soete

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.