"sh: myprogram: Bad file descriptor" on SMB share

Hi:

From my Neutrino 2.1.3 x86 target host I have SMB-mounted
(/usr/sbin/fs-cifs -a …) my Momentics workspace residing on my Windows XP
Pro workstation. The idea here is that I can (build, test)+ without needing
to upload the executable and data files from my workspace to the Neutrino
target. However, when I try to execute (from a pterm on the target) any
executable (e.g., myprogram) residing on the SMB share it prints “sh:
myprogram: Bad file descriptor”. I know the executable is valid because I
can copy it to the target’s hard drive and it executes just fine.

Any ideas about what the shell (ksh) is telling me, and how I can fix it? I
have tried different fs-cifs options and XP security settings on the
workspace, but nothing makes any difference.

->>>–Sherwood–>

Are you using 6.2.0? There is a bug got fixed in the later patch/release.
Weijie

“Dale Sherwood @NYAB” <Dale.Sherwood@nyab.com> wrote in message
news:bc4rls$t15$1@inn.qnx.com

Hi:

From my Neutrino 2.1.3 x86 target host I have SMB-mounted
(/usr/sbin/fs-cifs -a …) my Momentics workspace residing on my Windows
XP
Pro workstation. The idea here is that I can (build, test)+ without
needing
to upload the executable and data files from my workspace to the Neutrino
target. However, when I try to execute (from a pterm on the target) any
executable (e.g., myprogram) residing on the SMB share it prints “sh:
myprogram: Bad file descriptor”. I know the executable is valid because I
can copy it to the target’s hard drive and it executes just fine.

Any ideas about what the shell (ksh) is telling me, and how I can fix it?
I
have tried different fs-cifs options and XP security settings on the
workspace, but nothing makes any difference.

->>>–Sherwood–

“Weijie Zhang” <wzhang@qnx.com> wrote in message
news:bc558g$m0e$1@nntp.qnx.com

Are you using 6.2.0? There is a bug got fixed in the later patch/release.
Weijie

Weijie:

The short answer is: I don’t think so.

The long answer is: According to my notes I installed Neutrino and Photon
directly onto a clean partition from the 6.2.1 CD (by booting from the CD).
However, the QNX Software Installer shows the versions of the individual
core (Neutrino and Photon) packages, not the version of the Momentics
product (which is not installed). Furthermore, the individual core packages
are not listed in the PE 6.2.1 CD repository–if they were, they would say
“installed” or “new”, which would give me a clue.

Can you give me details–filespec, date, time, size–of the files that fixed
this SMB problem, or some other means of verifying if I have the fix? I
have visited the updates on your web site and I found nothing newer than
6.2.1.

P.S.–I confess to some confusion about versions. The QNX Software Installer
says I have Neutrino 2.1.3 and Photon 2.0.3. However, QNX has an update on
their web site that refers to Neutrino 6.2.1. And my Momentics IDE says it
is version 2.0 (presumably because of Eclipse 2.0). So when you ask me
something simple like, “Are you using 6.2.0”, I regret that I have no simple
answer to give :-/

->>–Sherwood–>

The short answer is: I don’t think so.

[SNIP]

Try using “uname -a”…

–cdm@bigbox–> uname -a
QNX bigbox 6.2.1 2003/05/17-02:30:31edt x86pc x86

chris

\

Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

“Chris McKillop” <cdm@qnx.com> wrote in message
news:bc5njl$cb3$1@nntp.qnx.com

Try using “uname -a”…
[snip]

Thanks, Chris. I don’t think I would have found that one on my own any time
soon–not very intuitive, is it?

->>>–Sherwood–>

“Weijie Zhang” <wzhang@qnx.com> wrote in message
news:bc558g$m0e$1@nntp.qnx.com

Are you using 6.2.0? There is a bug got fixed in the later patch/release.
Weijie

Weijie:

My final answer (thanks to Chris) is:
I am using version 6.2.1 2003/01/18-02:12:22est.

Is the fix in a newer patch/release?

->>>–Sherwood–>

Thanks, Chris. I don’t think I would have found that one on my own any time
soon–not very intuitive, is it?

Guess that depends on if you are used to UNIX/POSIX systems or not. :wink:

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Hello Dale:

Thanks for the information. The fs-cifs works fine for me on my 6.2.1. I
guess there may be something mismatch during your installation? Can you
double check version of your fs-cifs by use of pkgctl? I gave you the info
of my box below:

  1. uname -a →
    same as yours, i.e., 6.2.1 2003/01/18-02: 12: 22est x86pc x86
  2. pkgctl /usr/sbin/fs-cifs →
    Localpath: [/usr/sbin/fs-cifs]
    Fullpath: [/pkgs/repository/qnx/os/core-2.1.4/x86/usr/sbin/fs-cifs]
    Repository: [/pkgs/repository]
    Vendor: [qnx/os/core-2-1-4]
    Tree: [x86/usr/sbin/fs-cifs]

Weijie

“Dale Sherwood @NYAB” <Dale.Sherwood@nyab.com> wrote in message
news:bc5obc$1i7$1@inn.qnx.com

“Weijie Zhang” <> wzhang@qnx.com> > wrote in message
news:bc558g$m0e$> 1@nntp.qnx.com> …
Are you using 6.2.0? There is a bug got fixed in the later
patch/release.
Weijie


Weijie:

My final answer (thanks to Chris) is:
I am using version 6.2.1 2003/01/18-02:12:22est.

Is the fix in a newer patch/release?

->>>–Sherwood–

“Chris McKillop” <cdm@qnx.com> wrote in message
news:bc6ged$97l$2@nntp.qnx.com

Guess that depends on if you are used to UNIX/POSIX systems or not. > :wink:

chris

I’ve never really paid any attention to POSIX, but that is changing. I’m now
porting my QNX 4 toolkit library to QNX 6, and decided to make it
POSIX-compliant so that I will not have to port it again for QNX 8 :-/

->>>–Sherwood–>

Weijie:

Okay, here is my info:

$ /usr/sbin/pkgctl /usr/sbin/fs-cifs
— Information from /dev/pkginfo12 —
Localpath: [/usr/sbin/fs-cifs]
Fullpath: [/pkgs/base/qnx/os/core-2.1.3/x86/usr/sbin/fs-cifs]
Repository: [/pkgs/base]
Vendor: [qnx/os/core-2.1.3]
Tree: [x86/usr/sbin/fs-cifs]

Not the same as yours. The only things in my /pkgs/repository/qnx directory
are qnxinstall_r and qnxupdater_r.

->>>–Sherwood–>

“Weijie Zhang” <wzhang@qnx.com> wrote in message
news:bc7bjp$b0l$1@nntp.qnx.com

Hello Dale:

Thanks for the information. The fs-cifs works fine for me on my 6.2.1. I
guess there may be something mismatch during your installation? Can you
double check version of your fs-cifs by use of pkgctl? I gave you the info
of my box below:

  1. uname -a –
    same as yours, i.e., 6.2.1 2003/01/18-02: 12: 22est x86pc x86
  2. pkgctl /usr/sbin/fs-cifs –
    Localpath: [/usr/sbin/fs-cifs]
    Fullpath:
    [/pkgs/repository/qnx/os/core-2.1.4/x86/usr/sbin/fs-cifs]
    Repository: [/pkgs/repository]
    Vendor: [qnx/os/core-2-1-4]
    Tree: [x86/usr/sbin/fs-cifs]

Weijie

“Dale Sherwood @NYAB” <> Dale.Sherwood@nyab.com> > wrote in message
news:bc5obc$1i7$> 1@inn.qnx.com> …

“Weijie Zhang” <> wzhang@qnx.com> > wrote in message
news:bc558g$m0e$> 1@nntp.qnx.com> …
Are you using 6.2.0? There is a bug got fixed in the later
patch/release.
Weijie


Weijie:

My final answer (thanks to Chris) is:
I am using version 6.2.1 2003/01/18-02:12:22est.

Is the fix in a newer patch/release?

->>>–Sherwood–
\

If you didn’t install the Momentics package then you don’t have the 6.2.1
files. The 6.2.1 CD installs a 6.2.1 boot image (kernel, libc, etc), but all
the other files are 6.2.0 until you install Momentics.


Marty Doane
Siemens Dematic


“Dale Sherwood @NYAB” <Dale.Sherwood@nyab.com> wrote in message
news:bc5e72$k5l$1@inn.qnx.com

“Weijie Zhang” <> wzhang@qnx.com> > wrote in message
news:bc558g$m0e$> 1@nntp.qnx.com> …
Are you using 6.2.0? There is a bug got fixed in the later
patch/release.
Weijie


Weijie:

The short answer is: I don’t think so.

The long answer is: According to my notes I installed Neutrino and Photon
directly onto a clean partition from the 6.2.1 CD (by booting from the
CD).
However, the QNX Software Installer shows the versions of the individual
core (Neutrino and Photon) packages, not the version of the Momentics
product (which is not installed). Furthermore, the individual core
packages
are not listed in the PE 6.2.1 CD repository–if they were, they would say
“installed” or “new”, which would give me a clue.

Can you give me details–filespec, date, time, size–of the files that
fixed
this SMB problem, or some other means of verifying if I have the fix? I
have visited the updates on your web site and I found nothing newer than
6.2.1.

P.S.–I confess to some confusion about versions. The QNX Software
Installer
says I have Neutrino 2.1.3 and Photon 2.0.3. However, QNX has an update on
their web site that refers to Neutrino 6.2.1. And my Momentics IDE says it
is version 2.0 (presumably because of Eclipse 2.0). So when you ask me
something simple like, “Are you using 6.2.0”, I regret that I have no
simple
answer to give :-/

->>–Sherwood–

“Marty Doane” <martin.doane@siemens.com> wrote in message
news:bc7l39$lnk$1@nntp.qnx.com

If you didn’t install the Momentics package then you don’t have the 6.2.1
files. The 6.2.1 CD installs a 6.2.1 boot image (kernel, libc, etc), but
all
the other files are 6.2.0 until you install Momentics.


Marty Doane
Siemens Dematic

Marty:

Thanks, that’s very helpful.

However, if that is true then how am I supposed to deal with the licensing
issue? I have a Momentics license for 1 seat, installed on my XP
workstation. My QNX machine is my development target, which only needs the
QNX runtime.

Apparently I need the 2.1.4 core package to fix this problem. If it’s not
installed with the runtime from the 6.2.1 CD, how do I install it?

(To sales@qnx.com – The thought, “Buy another Momentics license!”, has
already occurred to me, but that is not an option :slight_smile:

->>>–Sherwood–>

Use the Non-Commercial version on the target? It seems to me to not make
much sense to consider a target as needing a separate license. Perhaps our
non self-hosted licenses should be for a development host and a runtime.
After all, we don’t ship an emulator (although current versions of VMWare
work nicely) so it seems a development host would be pretty useless without
a target. Either way, there is no flexlm licensing on the Neutrino side so
there’s nothing TECHNICALLY to stop you from just running the target.
Legally, I’m not so sure but I won’t tell if you don’t.

cheers,

Kris

“Dale Sherwood @NYAB” <Dale.Sherwood@nyab.com> wrote in message
news:bc7nej$ble$1@inn.qnx.com

“Marty Doane” <> martin.doane@siemens.com> > wrote in message
news:bc7l39$lnk$> 1@nntp.qnx.com> …
If you didn’t install the Momentics package then you don’t have the
6.2.1
files. The 6.2.1 CD installs a 6.2.1 boot image (kernel, libc, etc), but
all
the other files are 6.2.0 until you install Momentics.


Marty Doane
Siemens Dematic


Marty:

Thanks, that’s very helpful.

However, if that is true then how am I supposed to deal with the licensing
issue? I have a Momentics license for 1 seat, installed on my XP
workstation. My QNX machine is my development target, which only needs the
QNX runtime.

Apparently I need the 2.1.4 core package to fix this problem. If it’s not
installed with the runtime from the 6.2.1 CD, how do I install it?

(To > sales@qnx.com > – The thought, “Buy another Momentics license!”, has
already occurred to me, but that is not an option > :slight_smile:

->>>–Sherwood–

Kris:

Use the Non-Commercial version on the target?

Interesting approach. However, as I see it, the problem is that the PE
6.2.1 CD is broken if it does not install the newest versions of the Runtime
Components on a Target System (refer to Marty Doane’s reply).
Installing Momentics NC may be a workaround for the licensing issue, but
what guarantee do I have that NC has the newest versions? I want to
develop/debug using targets that are compatible with customer (i.e.,
commercial) systems.

It seems to me to not make much sense to consider a target as needing
a separate license. Perhaps our non self-hosted licenses should be for
a development host and a runtime. [snip] … a development host would
be pretty useless without a target.

I think the QNX Momentics EULA agrees with you. It permits me to install
the Runtime Components on “a reasonable number of Target Systems solely for
internal Target System development and testing purposes, and on one Target
System for demonstration, promotion, evaluation or training purposes”
[http://www.qnx.com/licensing/published/eula/meula1_04.html, B2(a)(iv)(1)].
Nevertheless, QNX_runtime != QNX_Momentics, so installing Momentics to get
the correct runtime is a license violation.

Either way, there is no flexlm licensing on the Neutrino side so
there’s nothing TECHNICALLY to stop you from just running the target.
Legally, I’m not so sure but I won’t tell if you don’t.

This is just between me and you, eh? Seriously, the QNX Momentics EULA
states that I can copy the software to “one developer’s Development
Workstation for each Licensed Seat”. However, it defines a Development
Workstation as “a licensed developer’s workstation, lap-top and/or home
computer used to perform Neutrino RTOS-based development, provided that the
Software is only used by the developer and is only used on one computer at a
time.” The “and/or” does seem to give me a legal loophole to do as you
suggest.

Bottom line: I can probably legally install Momentics on one Target System
to get the correct Runtime Components, but I think QNX should recognize this
as a problem and fix it in 6.2.2.

Thanks for your input.

->>>–Sherwood–>

To All – My Followup:

I installed Momentics PE 6.2.1 on my target host as suggested by Marty
Doane, and that fixed it. Thanks to all who provided help–I learned some
new things. As for the licensing issue, the definition of “Development
Workstation” in the EULA (meula1_04) provides the loophole, since I do not
expect to be using the developer’s tools on my target.

QNX should consider packaging the next Momentics release so that installing
the Runtime Components–e.g., by booting the CD and installing to an empty
partition–gets all the newest stuff. IMO it should not be necessary to
install the development tools simply to get the latest qnx packages (core,
drivers, libraries, photon, etc.). At the very least, the Installer program
should show those packages in the CD repository so they can be installed
individually.

Or maybe I went about this all wrong. Is there another CD for the Runtime
Components, similar to the QNX4 Product Suite CD, that lets me select which
packages to install on a Target System? As I recollect, the Momentics CD
did not offer these choices when I booted from it. It is reasonable to
expect that there is another CD(s) for installing delivered systems.

->>>–Sherwood–>