Bug 4319 - tlclient does not display error message on 64-bit systems without 32-bit libs
Summary: tlclient does not display error message on 64-bit systems without 32-bit libs
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: 3.4.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.2.0
Assignee: Peter Åstrand
URL:
Keywords: hean01_tester, prosaic
Depends on:
Blocks:
 
Reported: 2012-05-30 14:35 CEST by Aaron Sowry
Modified: 2014-05-14 09:47 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Aaron Sowry cendio 2012-05-30 14:35:08 CEST
Running tlclient on such a system simply gives a cryptic "not found" message, instead of printing the text in /opt/thinlinc/bin/tlclient which is supposed to be displayed when the client fails to launch.

We should either fix this, or remove it once we have a 64-bit client.
Comment 1 Peter Åstrand cendio 2013-12-16 08:42:35 CET
Failed to reproduce on CentOS 6, after removing glibc.i686:

$ /home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/tlclient
/home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/tlclient: /home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/../lib/tlclient/tlclient.bin: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
/home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/tlclient: line 16: /home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/../lib/tlclient/tlclient.bin: Success
The execution of the ThinLinc client failed. A common reason for
this is that you are using the wrong architecture. Perhaps you
are running a 32 bit client on a 64 bit system without support
for 32 bit applications?
Comment 2 Peter Åstrand cendio 2013-12-16 08:57:42 CET
Problem occurs on Ubuntu because their /bin/sh is not Bash. Our script looks like:

if [ "${BASH_VERSION}" ]; then
    shopt -s execfail
fi
exec "${ORIGIN}/../lib/tlclient/tlclient.bin" "$@"
echo The execution of the ThinLinc client failed. A common reason for
...

Solutions are:

1) Keep the existing behaviour. Drawback: Does not work an all platforms. 

2) Get rid of "execfail" and exec. Instead, print error if return code is 127. Drawback: The shell will stay running when the client runs, consuming some memory. 

3) Check for ${BASH_VERSION}", use existing 1) or 2) depending on if it is set. Drawback: In addition to the drawbacks of 1) and 2), we will also have more code.
Comment 3 Peter Åstrand cendio 2013-12-16 09:17:02 CET
> Solutions are:
> 
> 1) Keep the existing behaviour. Drawback: Does not work an all platforms. 
> 
> 2) Get rid of "execfail" and exec. Instead, print error if return code is 127.
> Drawback: The shell will stay running when the client runs, consuming some
> memory. 
> 
> 3) Check for ${BASH_VERSION}", use existing 1) or 2) depending on if it is set.
> Drawback: In addition to the drawbacks of 1) and 2), we will also have more
> code.

Decided on 2), fixed in 28208.
Comment 4 Henrik Andersson cendio 2014-03-18 13:37:58 CET
Tested 32bit client build 4290 on Fedora 19 without glibc.i686

[hean01@hean01-desktop bin]$ ../lib/tlclient/tlclient.bin 
bash: ../lib/tlclient/tlclient.bin: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[hean01@hean01-desktop bin]$ echo $?
126

which return error code 126 and not 127.. maybe catch both ?
Comment 5 Peter Åstrand cendio 2014-03-31 11:08:49 CEST
(In reply to comment #4)
> Tested 32bit client build 4290 on Fedora 19 without glibc.i686
> 
> [hean01@hean01-desktop bin]$ ../lib/tlclient/tlclient.bin 
> bash: ../lib/tlclient/tlclient.bin: /lib/ld-linux.so.2: bad ELF interpreter: No
> such file or directory
> [hean01@hean01-desktop bin]$ echo $?
> 126
> 
> which return error code 126 and not 127.. maybe catch both ?

r28763.
Comment 6 Henrik Andersson cendio 2014-04-01 15:47:06 CEST
(In reply to comment #5)
> (In reply to comment #4)
> > Tested 32bit client build 4290 on Fedora 19 without glibc.i686
> > 
> > [hean01@hean01-desktop bin]$ ../lib/tlclient/tlclient.bin 
> > bash: ../lib/tlclient/tlclient.bin: /lib/ld-linux.so.2: bad ELF interpreter: No
> > such file or directory
> > [hean01@hean01-desktop bin]$ echo $?
> > 126
> > 
> > which return error code 126 and not 127.. maybe catch both ?
> 
> r28763.

Tested using build 4310, works as expected.
Comment 7 Pierre Ossman cendio 2014-05-12 16:53:07 CEST
Now it incorrectly prints that message on most signals though. E.g. SIGKILL will result in a return code of 137.
Comment 8 Peter Åstrand cendio 2014-05-12 23:41:01 CEST
(In reply to comment #7)
> Now it incorrectly prints that message on most signals though. E.g. SIGKILL
> will result in a return code of 137.

28970
Comment 9 Henrik Andersson cendio 2014-05-14 09:47:58 CEST
(In reply to comment #8)
> (In reply to comment #7)
> > Now it incorrectly prints that message on most signals though. E.g. SIGKILL
> > will result in a return code of 137.
> 
> 28970

Verified using ThinLinc client 4.2.0 build 3454.

Note You need to log in before you can comment on or make changes to this bug.