disk_space and clib3s

Hi,
Anyone know where to get the legendary clib3s with the non-broken
disk_space function (compiled with stack vice register conventions). I’m
trying to recompile samba 2.0.7. There’s a bug that has cropped up with
recent XP clients wherein samba leaves stale lockfiles around after files
are closed, resulting in access denied errors.

  • Dave

On Sat, 05 Nov 2005 06:18:08 +0300, Dave Page <spam@dave-page.com> wrote:

where to get the legendary clib3s with the non-broken disk_space
function (compiled with stack vice register conventions)
Please, show “ls -l” and “cksum”.

(I’ve got all the updates possible, so may be mine “clib3s.lib” is what
you need.)

Tony.

You could try building a later version. Back in 2001 I sent in a patch to
samba.org which fixed the problem with register calling convention, thus
making it possible to build with the Watcom 10.4 compiler and clib3r
libraries. (But you still need the latest crypt library, though.) I think
the patch was incorporated as of version 2.2.2.

regards,
rick

Dave Page <spam@dave-page.com> wrote:

Hi,
Anyone know where to get the legendary clib3s with the non-broken
disk_space function (compiled with stack vice register conventions). I’m
trying to recompile samba 2.0.7. There’s a bug that has cropped up with
recent XP clients wherein samba leaves stale lockfiles around after files
are closed, resulting in access denied errors.

  • Dave

Rick:
OK. Presumably, the latest unix*.lib has been updated with crypt. I’ll
try 2.2.2
[root] /usr/watcom/10.6/usr/lib # ls -l unix3s*
-rw-r–r-- 1 root root 97280 Jun 15 2000 unix3s.lib
-rw-r–r-- 1 root root 88064 Dec 16 1996 unix3s.lib.qcrypt
(This from the QNX July 2003 CD)

Tony:
My non-working clib3s has the following signature:

[root] /usr/watcom/10.6/usr/lib # ls -l clib3s.lib
-rw-r–r-- 1 root root 390656 Jul 14 1997 clib3s.lib
[root] /usr/watcom/10.6/usr/lib # cksum clib3s.lib
3509738583 390656 clib3s.lib

The statfs test routine from samba 2.0.7 autoconf compiles ok with
register convention (3r) but SIGSEGVs with stack convention (3s).

Thanks - Dave

“Rick Lake” <rick@private-domain.invalid> wrote in message
news:dki9vv$k8$1@inn.qnx.com

You could try building a later version. Back in 2001 I sent in a patch to
samba.org which fixed the problem with register calling convention, thus
making it possible to build with the Watcom 10.4 compiler and clib3r
libraries. (But you still need the latest crypt library, though.) I think
the patch was incorporated as of version 2.2.2.

regards,
rick

Dave Page <> spam@dave-page.com> > wrote:
Hi,
Anyone know where to get the legendary clib3s with the non-broken
disk_space function (compiled with stack vice register conventions). I’m
trying to recompile samba 2.0.7. There’s a bug that has cropped up with
recent XP clients wherein samba leaves stale lockfiles around after files
are closed, resulting in access denied errors.

  • Dave

With a few simple hacks, 2.2.2 compiles under register. At first
glance, it runs ok. Also, annoying XP access denied bug seems resolved. Did
not need crypt.lib.

Thanks - Dave

“Dave Page” <spam@dave-page.com> wrote in message
news:dkjnrc$mh$1@inn.qnx.com

Rick:
OK. Presumably, the latest unix*.lib has been updated with crypt. I’ll
try 2.2.2

Great. And in the mean time I also found my old port of 2.2.2. and the
modifications I did to build it. (In case you need to compare notes.)

regards,
rick

Dave Page <spam@dave-page.com> wrote:

With a few simple hacks, 2.2.2 compiles under register. At first
glance, it runs ok. Also, annoying XP access denied bug seems resolved. Did
not need crypt.lib.

Thanks - Dave

“Dave Page” <> spam@dave-page.com> > wrote in message
news:dkjnrc$mh$> 1@inn.qnx.com> …
Rick:
OK. Presumably, the latest unix*.lib has been updated with crypt. I’ll
try 2.2.2

On Sun, 06 Nov 2005 04:58:39 +0300, Dave Page <spam@dave-page.com> wrote:

/usr/watcom/10.6/usr/lib # ls -l unix3s*
-rw-r–r-- 1 root root 97280 Jun 15 2000 unix3s.lib
-rw-r–r-- 1 root root 88064 Dec 16 1996
unix3s.lib.qcrypt
Did you link with the newer unix3s.lib when it SIGSEGVed?



My non-working clib3s has the following signature:
/usr/watcom/10.6/usr/lib # ls -l clib3s.lib
-rw-r–r-- 1 root root 390656 Jul 14 1997 clib3s.lib
/usr/watcom/10.6/usr/lib # cksum clib3s.lib
3509738583 390656 clib3s.lib
:frowning:

Mine is exactly the same!
Everything regarding the QNX4 tool-chain quality concerns me very much.
Are you sure the bug is in the clib3s.lib rather than in unix3s.lib? I
know of the issue with pre-security_patch version of unix3s.lib - “-3r”
flags on some (scandir.o I suspect) objects there.

The statfs test routine from samba 2.0.7 autoconf compiles ok with
register convention (3r) but SIGSEGVs with stack convention (3s).
Out of curiosity - could you please try the samba 2.0.7 in “-3s” mode with

the attached “beta3s.lib” - will it SIGSEGV too? (You’ll have to tell cc
to use the beta first and clib afterwards (with “-b” option))

Tony.

On Sun, 06 Nov 2005 14:40:04 +0300, Rick Lake
<rick@private-domain.invalid> wrote:

I also found my old port of 2.2.2. and the modifications I did to build
it. (In case you need to compare notes.)
:slight_smile:

Me too, please!

Tony.

Tony,

The beta3s.lib you supplied crashes with this:

[root] /home/root # cc -b -ltonybeta3s.lib -lunix -3s conftest.c
/usr/watcom/10.6/bin/wcc386 -zq -ms -3s -i=/usr/watcom/10.6/usr/include -i=/usr/include
conftest.c
/usr/watcom/10.6/bin/wlink op quiet form qnx flat na a.out op priv=3 op c
libp /usr/watcom/10.6/usr/lib:/usr/lib:. l
/usr/watcom/10.6/usr/lib/beta3s.lib l /usr/lib/tonybeta3s.lib l
/usr/watcom/10.6/usr/lib/unix3s.lib f /home/root/conftest.o op offset=40k op
st=32k
[root] /home/root # ./a.out

//1/home/root/a.out terminated (SIGSEGV) at 10AB:00006852.
%1 24760 Memory fault ./a.out
[root] /home/root #

Note this is not 2.0.7 itself, but rather the autoconf function (one of many
conftest.c):

#include <sys/types.h>
#include <sys/statfs.h>
main ()
{
struct statfs fsd;
exit (statfs(".", &fsd, sizeof fsd, 0));
}

For the sake of brevity.

Tony" <> mts.spb.suxx@mail.ru> > wrote in message
news:op.sztitfb2o93ri4@mobile…
On Sun, 06 Nov 2005 04:58:39 +0300, Dave Page <> spam@dave-page.com> > wrote:
/usr/watcom/10.6/usr/lib # ls -l unix3s*
-rw-r–r-- 1 root root 97280 Jun 15 2000 unix3s.lib
-rw-r–r-- 1 root root 88064 Dec 16 1996
unix3s.lib.qcrypt
Did you link with the newer unix3s.lib when it SIGSEGVed?

Yep

My non-working clib3s has the following signature:
/usr/watcom/10.6/usr/lib # ls -l clib3s.lib
-rw-r–r-- 1 root root 390656 Jul 14 1997 clib3s.lib
/usr/watcom/10.6/usr/lib # cksum clib3s.lib
3509738583 390656 clib3s.lib
:frowning:
Mine is exactly the same!
Everything regarding the QNX4 tool-chain quality concerns me very much.

I guess. It seems pretty reliable to me, as long as you steer clear of
the known deficiencies (disk_space() in 3s, Watcom Graphics, and threads).
Though, I use threads (in a clib restricted fashion) without much trouble
(my use analagous to “slow ISRs” in Linux) .And I use Watcom graphics
extensively, though with an old Proc32 (4.24G).

The only mysterious problem I see with QNX4 is random >1mSec hangs in
the network layer – but I can’t prove anything, as they occur too
infrequently to diagnose.

From what I’ve seen of the asm output, the Watcom tool chain is far
better than GCC. So, can’t win for losing. For this reason, I am reticent to
port to Neutrino, though I realize the GCC hit is amelorated by the increase
in CPU performance, over time.

Are you sure the bug is in the clib3s.lib rather than in unix3s.lib? I
know of the issue with pre-security_patch version of unix3s.lib - “-3r”
flags on some (scandir.o I suspect) objects there.

The statfs test routine from samba 2.0.7 autoconf compiles ok with
register convention (3r) but SIGSEGVs with stack convention (3s).
Out of curiosity - could you please try the samba 2.0.7 in “-3s” mode with
the attached “beta3s.lib” - will it SIGSEGV too? (You’ll have to tell cc
to use the beta first and clib afterwards (with “-b” option))

Thanks - Dave

Dave Page <spam@dave-page.com> wrote:

Hi,
Anyone know where to get the legendary clib3s with the non-broken
disk_space function (compiled with stack vice register conventions). I’m
trying to recompile samba 2.0.7. There’s a bug that has cropped up with
recent XP clients wherein samba leaves stale lockfiles around after files
are closed, resulting in access denied errors.

  • Dave

Hi Dave,
Steve has posted the source for disk_space for you:
http://www.openqnx.com/PNphpBB2-viewtopic-t6935-.html