Libelektra: Semlock: Unit Tests Fail on Debian with Build Type RelWithDebInfo

Created on 8 Jan 2017  路  12Comments  路  Source: ElektraInitiative/libelektra

To be fixed together after working global plugins (i.e. when semlock can be tested)

https://build.libelektra.org/job/elektra-gcc-configure-debian-jessie-minimal/lastFailedBuild/console

        Start  66: testmod_semlock
 66/138 Test  #66: testmod_semlock ....................***Failed    0.12 sec
SEMLOCK     TESTS
==================

test Open & Close
There are 2 warnings
buffer is: warnings/#00
number: 11
description: open of plugin returned unsuccessfully (reason contains plugin, see other warnings for details)
ingroup: kdb
module: 
file: /home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/libs/elektra/plugin.c
line: 297
reason: semlock
reason: 
reason: 
buffer is: warnings/#01/configfile
number: (null)
description: kdbClose() failed
ingroup: kdb
module: 
file: /home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/libs/elektra/plugin.c
line: 328
reason: kdbClose() failed
reason: 
reason: 
/home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/plugins/semlock/testmod_semlock.c:23: error in test_OpenClose: warnings in kdbOpen for plugin semlock
number: 145
description: : semlock plugin error
ingroup: : plugin
module: : semlock
at: /home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/plugins/semlock/semlock.c:58
reason: : Open semaphore: ENOSYS. /dev/shm should be mounted as tempfs. Please look in the README using "kdb info semlock"!

mountpoint: : 
configfile: : 
/home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/plugins/semlock/testmod_semlock.c:23: error in test_OpenClose: error in kdbOpen for plugin semlock
/home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/plugins/semlock/testmod_semlock.c:23: fatal in test_OpenClose: could not open semlock plugin

        Start  67: testmod_shell
...
        Start  80: testscr_check_kdb_internal_check
 80/138 Test  #80: testscr_check_kdb_internal_check ...***Failed    0.55 sec

ELEKTRA KDB INTERNAL TEST SUITE

Check if script tests the correct version
error: check of plugin semlock failed
error: check of plugin semlock produced: "Was not able to load such a plugin! Maybe you misspelled it, there is no such plugin or the loader has problems. You might want to try to set LD_LIBRARY_PATH, use kdb-full or kdb-static. Errors/Warnings during loading were: Sorry, the error (#145) occurred ;( Description: semlock plugin error Ingroup: plugin Module: semlock At: /home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/plugins/semlock/semlock.c:58 Reason: Open semaphore: ENOSYS. /dev/shm should be mounted as tempfs. Please look in the README using "kdb info semlock"! Mountpoint: Configfile: Sorry, 2 warnings were issued ;( Warning (#11): Description: open of plugin returned unsuccessfully (reason contains plugin, see other warnings for details) Ingroup: kdb Module: At: /home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/libs/elektra/plugin.c:297 Reason: semlock Mountpoint: Configfile: Warning (#12): Description: kdbClose() failed Ingroup: kdb Module: At: /home/jenkins/workspace/workspace/elektra-gcc-configure-debian-jessie-minimal/src/libs/elektra/plugin.c:328 Reason: kdbClose() failed Mountpoint: Configfile: "
testscr_check_kdb_internal_check.sh RESULTS: 132 test(s) done 2 error(s).

        Start  81: testscr_check_kdb_internal_suite
...

All 12 comments

I do not know when this was fixed. Anyway testmod_semlock works fine both on the minimal Jesse and Stretch builds. The test fails, if we specify the build type RelWithDebInfo and build all plugins though. I changed the title accordingly and deactivated the broken configuration in elektra-multiconfig-gcc-stable.

Hi Kurt, happy new year 馃

Any chance we get this fixed soon? The unit tests of semlock repeatedly fails, e.g. #1762

Hello Happy New Year!!
The reason for this constant fail is:

Open semaphore: ENOSYS. /dev/shm should be mounted as tempfs. Please look in the README using "kdb info semlock"!

Could it be that the agent has /dev/shm not mounted as tempfs?
When not look at: https://stackoverflow.com/questions/270113/how-do-i-stop-sem-open-failing-with-enosys

It is possible that some agents do not have /dev/shm mounted. @sanssecours Is there a pattern at which agents the problems occur?

Nevertheless, I would prefer that the test case detects this and aborts with a clear message that this is the case. We already have such checks, for example a check for /dev/stdout in tests/shell/check_export.sh.

I can add such a /dev/shm is tempfs detection, I think shell will not work since testmod_semlock is a C application. I found the possibility to open /etc/mtab and look there if it is mounted, do you think that is a good solution?

Sounds okay but too much effort. Why not simply do a if (system("mount | grep /dev/shm")) or similar.

Does semlock work correctly at the moment?

The PR #1766 contains the check

@sanssecours Is there a pattern at which agents the problems occur?

As far as I can tell only debian-stable-mm executes elektra-multiconfig-gcc-stable, since we restrict the project to only run on agents that service the label stable.

debian-stable-mm has "tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)". And if it is always executed at the same agent the reason cannot be a problem in the environment because it does not always occur.

@markus2330 I will disable the tests for the semlock plugin in another PR, reasons:

  • plugin not working currently due to global hooks
  • very weird behavior (/dev/shm mounted as tempfs but the error comes anyway), indicates fast debugging not possible
  • I have more important stuff to finish

This issue and all other issues regarding the semlock plugin will be fixed after 31.01. I will mark the plugin accordingly for now!

See #1767 for disabling

closed due to semlock removal #2411

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markus2330 picture markus2330  路  3Comments

mpranj picture mpranj  路  3Comments

markus2330 picture markus2330  路  3Comments

markus2330 picture markus2330  路  4Comments

sanssecours picture sanssecours  路  4Comments