TPM2 test cases failed to load share libraries in checkbox-snappy + checkbox18 environment

Bug #1824454 reported by Robert Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Snappy
Fix Released
High
Sylvain Pineau

Bug Description

The TPM test cases worked with checkbox-snappy before (couple days ago).
After upgraded to the new checkbox-snappy + checkbox18, the TPM2 test cases failed.
The error showed libtcti-socket.so.0 is not found.

The output log:
tpm2_takeownership: error while loading shared libraries: libtcti-socket.so.0: cannot open shared object file: No such file or directory

[1;33m\[0mtpm2_takeownership -c on line 47 failed: 127
tpm2_listpersistent: error while loading shared libraries: libtcti-socket.so.0: cannot open shared object file: No such file or directory

[1;31mtest_tpm2_takeownership.sh ... FAILED[0m

Related branches

Changed in checkbox-ng:
assignee: nobody → Sylvain Pineau (sylvain-pineau)
status: New → In Progress
affects: checkbox-ng → checkbox-snappy
Changed in checkbox-snappy:
importance: Undecided → High
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Weird that all tpm2 libs are not in /lib/x86_64-linux-gnu/:

/snap/checkbox18/current/lib$ ls
./ libsapi.so.0@ libtcti-socket.a python3.6/
../ libsapi.so.0.0.0* libtcti-socket.so@ systemd/
fwts/ libtcti-device.a libtcti-socket.so.0@ udev/
hdparm/ libtcti-device.so@ libtcti-socket.so.0.0.0* x86_64-linux-gnu/
libsapi.a libtcti-device.so.0@ modprobe.d/
libsapi.so@ libtcti-device.so.0.0.0* pkgconfig/

The reason why we start to fail the tests since the move to checkbox18+checkbox-snappy is that we don't include /lib in wrapper_common LD_LIBRARY_PATH additional paths:

https://git.launchpad.net/checkbox-snappy/tree/launchers/wrapper_common#n55

  append_dir LD_LIBRARY_PATH $RUNTIME/lib/$ARCH
  append_dir LD_LIBRARY_PATH $RUNTIME/usr/lib/$ARCH
  append_dir LD_LIBRARY_PATH $RUNTIME/lib/fwts

So that's a fix for checkbox-snappy only (in wrapper common) and probably just for the 18 track though it would be good to port the same fix to series16 even if so far nothing is in /lib:

/snap/checkbox/current/lib$ ls
./ ../ fwts/ hdparm/ modprobe.d/ python3.5/ systemd/ udev/ x86_64-linux-gnu/

Changed in checkbox-snappy:
status: In Progress → Triaged
Changed in checkbox-snappy:
status: Triaged → In Progress
status: In Progress → Fix Committed
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

@Robert you can try checkbox-snappy from edge to verify the fix works (in revision 1947):

snap install checkbox-snappy --devmode --channel=18/edge

https://dashboard.snapcraft.io/snaps/checkbox-snappy/revisions/1947/

Revision history for this message
Robert Liu (robertliu) wrote :

@Sylvain,

Thanks for the prompt reply.

I've tried the revision on the edge channel and the TPM2 test cases work properly now.

Changed in checkbox-snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.