Discussion:
lis_stropen error
Alvarez, Angel
2006-05-08 13:39:40 UTC
Permalink
Hi guys
First of all, I am a completly neophyte to LiS
I'm not developer, just a Linux administrator
I'm using LiS because it is a requirement to install IBM Communications
Server in SuSE SLES8 kernel 2.4.21-292-smp LiS 2.16 + patch provide by
IBM and CS 6.2
I found this error in the messages.log
May 2 02:05:30 snet0001lx kernel: lis_stropen(...)#6295804
May 2 02:05:30 snet0001lx kernel: >> open_mods() error (-16)
...
until
May 2 09:48:49 snet0001lx kernel: lis_stropen(...)#6372652
May 2 09:48:49 snet0001lx kernel: >> open_mods() error (-16)

I was searching in google but had no info available
Can you help me??
Any suggestion will be appreciated
thanks in advance

PS:this is the second message. I can't view the archives at
http://gsyc.escet.urjc.es/mailarchive/linux-streams

403 error (forbidden)
--
Angel Claudio Alvarez
Investigación y Desarrollo
Gerencia de Tecnología
Banco Credicoop C.L.
54-11-4857-5970

"Este mensaje y sus anexos son confidenciales y para uso exclusivo del titular de la dirección de e-mail a que está dirigido. Puede contener información amparada por el secreto bancario o cuyo uso inadecuado pueda derivar en responsabilidad civil o penal, por lo que su contenido no debe ser copiado, enviado, revelado o utilizado en forma no autorizada expresamente por el emisor. Si Ud. no fuera el destinatario especificado en el mensaje o persona autorizada por éste, informe de tal situación reenviando el mensaje al emisor y bórrelo de su sistema. El emisor no acepta responsabilidad alguna por errores contenidos en este mensaje ni garantiza la seguridad o exactitud de lo transmitido, ya que el mismo puede ser objeto de alteración, demora, pérdida, contener virus informáticos u otras anomalías. El Bco. Credicoop C.L. no tiene intención de generar correo no deseado, pero si Ud. entiende que está siendo afectado por esta práctica, reenvíe este e-mail a: ***@bancocredicoop.coop."
Steve Schefter
2006-05-08 14:18:43 UTC
Permalink
Hi Angel.
Post by Alvarez, Angel
I'm using LiS because it is a requirement to install IBM Communications
Server in SuSE SLES8 kernel 2.4.21-292-smp LiS 2.16 + patch provide by
IBM and CS 6.2
I found this error in the messages.log
May 2 02:05:30 snet0001lx kernel: lis_stropen(...)#6295804
May 2 02:05:30 snet0001lx kernel: >> open_mods() error (-16)
...
until
May 2 09:48:49 snet0001lx kernel: lis_stropen(...)#6372652
May 2 09:48:49 snet0001lx kernel: >> open_mods() error (-16)
Unfortunately, it doesn't appear to be a problem within LiS, just
reported by LiS.

LiS' open_mods() calls lis_qopen() which in turn calls the open
routines of the modules associated with the devices being opened.
It is one of the module's open routines (part of CS?) that is
reporting error 16 (EBUSY).

Note that this path is only followed when an existing stream is
being reopened. Given the error EBUSY, reopening may not be
supported by that module. It may be that you need to change some
configuration to use /dev/XX1 and /dev/XX2 rather than both using
/dev/XX1. Or it may be that the /dev entry is built incorrectly
and should be a cloning device (have the major number of the
clone driver and the min number equal to the add-on module's
major).

In any event, it looks like the problem is CS-specific.
Post by Alvarez, Angel
PS:this is the second message. I can't view the archives at
http://gsyc.escet.urjc.es/mailarchive/linux-streams
You can see the archive at:
http://www.mail-archive.com/linux-streams%40gsyc.escet.urjc.es/

Regards,
Steve

------------------------------------------------------------------------
Steve Schefter phone: +1 705 725 9999 x26
The Software Group Limited fax: +1 705 725 9666
642 Welham Road, email: ***@wanware.com
Barrie, Ontario CANADA L4N 9A1 Web: www.wanware.com
Brian F. G. Bidulock
2006-05-08 18:16:19 UTC
Permalink
Steve,

SVR 4.2 STREAMS modules do no return negative error numbers, they
return MODOPENFAIL, which is translated to ENXIO when returned to
the opening process. LiS does not comply to SVR 4.2 because it
does not accept a positive error code. Almost everywhere you point
LiS has an error. This is just an example where someone happened
to point.

Linux Fast-STREAMS accepts positive error numbers, but also will
accept negative error numbers for compatibility with broken LiS
modules and drivers.

--brian
Post by Steve Schefter
Hi Angel.
Post by Alvarez, Angel
I'm using LiS because it is a requirement to install IBM Communications
Server in SuSE SLES8 kernel 2.4.21-292-smp LiS 2.16 + patch provide by
IBM and CS 6.2
I found this error in the messages.log
May 2 02:05:30 snet0001lx kernel: lis_stropen(...)#6295804
May 2 02:05:30 snet0001lx kernel: >> open_mods() error (-16)
...
until
May 2 09:48:49 snet0001lx kernel: lis_stropen(...)#6372652
May 2 09:48:49 snet0001lx kernel: >> open_mods() error (-16)
Unfortunately, it doesn't appear to be a problem within LiS, just
reported by LiS.
LiS' open_mods() calls lis_qopen() which in turn calls the open
routines of the modules associated with the devices being opened.
It is one of the module's open routines (part of CS?) that is
reporting error 16 (EBUSY).
Note that this path is only followed when an existing stream is
being reopened. Given the error EBUSY, reopening may not be
supported by that module. It may be that you need to change some
configuration to use /dev/XX1 and /dev/XX2 rather than both using
/dev/XX1. Or it may be that the /dev entry is built incorrectly
and should be a cloning device (have the major number of the
clone driver and the min number equal to the add-on module's
major).
In any event, it looks like the problem is CS-specific.
Post by Alvarez, Angel
PS:this is the second message. I can't view the archives at
http://gsyc.escet.urjc.es/mailarchive/linux-streams
http://www.mail-archive.com/linux-streams%40gsyc.escet.urjc.es/
Regards,
Steve
------------------------------------------------------------------------
Steve Schefter phone: +1 705 725 9999 x26
The Software Group Limited fax: +1 705 725 9666
Barrie, Ontario CANADA L4N 9A1 Web: www.wanware.com
_______________________________________________
Linux-streams mailing list
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
--
Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦
***@openss7.org ¦ world; the unreasonable one persists in ¦
http://www.openss7.org/ ¦ trying to adapt the world to himself. ¦
¦ Therefore all progress depends on the ¦
¦ unreasonable man. -- George Bernard Shaw ¦
Steve Schefter
2006-05-08 19:13:03 UTC
Permalink
Post by Brian F. G. Bidulock
SVR 4.2 STREAMS modules do no return negative error numbers, they
return MODOPENFAIL, which is translated to ENXIO when returned to
the opening process. LiS does not comply to SVR 4.2 because it
does not accept a positive error code. Almost everywhere you point
LiS has an error. This is just an example where someone happened
to point.
Does SVR 4.2 Streams say that MODOPENFAIL is a postive number?

Your Streams programer's guide is a little more up to date than
mine (System V/3.2). Mine indicates that >= 0 should be returned
for success and OPENFAIL (must therefore be a negative number)
for error. In my modules, I return OPENFAIL but as evidenced by
the IBM modules, not everyone does that.

The other references I have at hand are Solaris and UnixWare.
Solaris docs indicate that "The return value from open is 0 for
success and an error number for failure". UnixWare does likewise
but specifically lists error codes (eg EACCESS, EADDRINUSE)
which, on Linux, translate to negative numbers.

If something other than OPENFAIL is coming out of the open
routine, it's the module that's doing that, not LiS.
In my opinion, Dave made a good choice in looking for _any_
negative number. It could be strict about making sure that
the driver returned OPENFAIL/MODOPENFAIL, but that would break
drivers being ported from other OSes. And it begs the question
about what Streams would do if the driver returned neither >= 0
nor OPENFAIL/MODOPENFAIL. Indicate a error back to the app
(which is what the driver is trying to do)?

Steve

------------------------------------------------------------------------
Steve Schefter phone: +1 705 725 9999 x26
The Software Group Limited fax: +1 705 725 9666
642 Welham Road, email: ***@wanware.com
Barrie, Ontario CANADA L4N 9A1 Web: www.wanware.com
Brian F. G. Bidulock
2006-05-08 22:03:05 UTC
Permalink
Steve,

SVR 4.2 STREAMS Programmer's Guide: Section 6.5 Design Guidlines,
6.5.1 Modules and Drivers, 6.5.1.1 Rules for Open/Close Routines,

2. The open routine should return zero on success and an error number on
failure. ...

Under UNIX, error numbers are not negative.

On the POSIX ioctl manual page, only ENXIO is returned when the push
of a module fails. Thus OPENFAIL (sorry, not MODOPENFAIL).

--brian
Post by Steve Schefter
Post by Brian F. G. Bidulock
SVR 4.2 STREAMS modules do no return negative error numbers, they
return MODOPENFAIL, which is translated to ENXIO when returned to
the opening process. LiS does not comply to SVR 4.2 because it
does not accept a positive error code. Almost everywhere you point
LiS has an error. This is just an example where someone happened
to point.
Does SVR 4.2 Streams say that MODOPENFAIL is a postive number?
Your Streams programer's guide is a little more up to date than
mine (System V/3.2). Mine indicates that >= 0 should be returned
for success and OPENFAIL (must therefore be a negative number)
for error. In my modules, I return OPENFAIL but as evidenced by
the IBM modules, not everyone does that.
The other references I have at hand are Solaris and UnixWare.
Solaris docs indicate that "The return value from open is 0 for
success and an error number for failure". UnixWare does likewise
but specifically lists error codes (eg EACCESS, EADDRINUSE)
which, on Linux, translate to negative numbers.
If something other than OPENFAIL is coming out of the open
routine, it's the module that's doing that, not LiS.
In my opinion, Dave made a good choice in looking for _any_
negative number. It could be strict about making sure that
the driver returned OPENFAIL/MODOPENFAIL, but that would break
drivers being ported from other OSes. And it begs the question
about what Streams would do if the driver returned neither >= 0
nor OPENFAIL/MODOPENFAIL. Indicate a error back to the app
(which is what the driver is trying to do)?
Steve
------------------------------------------------------------------------
Steve Schefter phone: +1 705 725 9999 x26
The Software Group Limited fax: +1 705 725 9666
Barrie, Ontario CANADA L4N 9A1 Web: www.wanware.com
--
Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦
***@openss7.org ¦ world; the unreasonable one persists in ¦
http://www.openss7.org/ ¦ trying to adapt the world to himself. ¦
¦ Therefore all progress depends on the ¦
¦ unreasonable man. -- George Bernard Shaw ¦
Loading...