celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] PengZheng opened a new issue #297: example_import example crashed
Date Wed, 25 Nov 2020 10:42:16 GMT

PengZheng opened a new issue #297:
URL: https://github.com/apache/celix/issues/297


   I revived the mentioned example using the attached patch.
   [celix.zip](https://github.com/apache/celix/files/5596133/celix.zip)
   
   It's easy to reproduce the crash:
   
   1. uninstall hello_export
   2. update hello_bundle
   
   ```
   peng@hackerlife:~/Downloads/git/celix$ CELIX_BUNDLES_PATH=/home/peng/Downloads/git/celix/build/deploy/hello/helloworld_withcopy/bundles
gdb ./build/deploy/hello/helloworld_withcopy/helloworld_withcopyd
   GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
   Copyright (C) 2020 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.
   Type "show copying" and "show warranty" for details.
   This GDB was configured as "x86_64-linux-gnu".
   Type "show configuration" for configuration details.
   For bug reporting instructions, please see:
   <http://www.gnu.org/software/gdb/bugs/>.
   Find the GDB manual and other documentation resources online at:
       <http://www.gnu.org/software/gdb/documentation/>.
   
   For help, type "help".
   Type "apropos word" to search for commands related to "word"...
   Reading symbols from ./build/deploy/hello/helloworld_withcopy/helloworld_withcopyd...
   (gdb) run
   Starting program: /home/peng/Downloads/git/celix/build/deploy/hello/helloworld_withcopy/helloworld_withcopyd
   [Thread debugging using libthread_db enabled]
   Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
   [New Thread 0x7ffff6aa6700 (LWP 96269)]
   Hello World
   Hello from second lib
   Hello from (imported) third lib
   [New Thread 0x7ffff62a5700 (LWP 96270)]
   [2020-11-25T18:40:48] [info] [celix_framework] [framework_start:581] Celix framework started
   -> uninstall
   Incorrect number of arguments.
   -> lb
     Groups:
     Group                Bundle Ids
     -                    2 1
     Celix                4 3 0
   
   
     Bundles:
     ID    State        Name                                     Group
     1     Active       hello_export
     2     Active       hello_bundle
   
   
   -> uninstall 1
   -> update 2
   Goodbye World
   
   Thread 3 "helloworld_with" received signal SIGSEGV, Segmentation fault.
   0x00007ffff7f495e6 in celix_version_compareTo (version=0x0, compare=0x7fffe8001c40) at
/home/peng/Downloads/git/celix/libs/utils/src/version.c:256
   256             int res = version->major - compare->major;
   (gdb) bt
   Selected thread is running.
   (gdb) t 3
   [Switching to thread 3 (Thread 0x7ffff62a5700 (LWP 96270))]
   #0  0x00007ffff7f495e6 in celix_version_compareTo (version=0x0, compare=0x7fffe8001c40)
at /home/peng/Downloads/git/celix/libs/utils/src/version.c:256
   256             int res = version->major - compare->major;
   (gdb) bt
   #0  0x00007ffff7f495e6 in celix_version_compareTo (version=0x0, compare=0x7fffe8001c40)
at /home/peng/Downloads/git/celix/libs/utils/src/version.c:256
   #1  0x00007ffff7f49066 in version_compareTo (version=0x0, compare=0x7fffe8001c40, result=0x7ffff62a42a0)
at /home/peng/Downloads/git/celix/libs/utils/src/version.c:84
   #2  0x00007ffff7f49a6d in versionRange_isInRange (versionRange=0x7fffe8001c60, version=0x0,
inRange=0x7ffff62a4348) at /home/peng/Downloads/git/celix/libs/utils/src/version_range.c:86
   #3  0x00007ffff7fa0bf2 in requirement_isSatisfied (requirement=0x7fffe8001c10, capability=0x55555558d200,
inRange=0x7ffff62a4348) at /home/peng/Downloads/git/celix/libs/framework/src/requirement.c:108
   #4  0x00007ffff7fa10f2 in resolver_populateCandidatesMap (candidatesMap=0x7fffe8001cc0,
targetModule=0x7fffe8001720) at /home/peng/Downloads/git/celix/libs/framework/src/resolver.c:157
   #5  0x00007ffff7fa0ce3 in resolver_resolve (root=0x7fffe8001720) at /home/peng/Downloads/git/celix/libs/framework/src/resolver.c:75
   #6  0x00007ffff7f982d6 in fw_startBundle (framework=0x55555558a1e0, bndId=2, options=1)
at /home/peng/Downloads/git/celix/libs/framework/src/framework.c:857
   #7  0x00007ffff7f98ba0 in framework_updateBundle (framework=0x55555558a1e0, bundle=0x55555558a820,
inputFile=0x0) at /home/peng/Downloads/git/celix/libs/framework/src/framework.c:1011
   #8  0x00007ffff7f8db0b in bundle_update (bundle=0x55555558a820, inputFile=0x0) at /home/peng/Downloads/git/celix/libs/framework/src/bundle.c:286
   #9  0x00007ffff7f23463 in updateCommand_execute (handle=0x5555555946d0, const_line=0x7ffff62a4b52
"update 2", outStream=0x7ffff7e096a0 <_IO_2_1_stdout_>, errStream=0x7ffff7e095c0 <_IO_2_1_stderr_>)
at /home/peng/Downloads/git/celix/bundles/shell/shell/src/update_command.c:66
   #10 0x00007ffff7f21c20 in shell_executeCommand (shell=0x5555555959a0, commandLine=0x7ffff62a4b52
"update 2", out=0x7ffff7e096a0 <_IO_2_1_stdout_>, err=0x7ffff7e095c0 <_IO_2_1_stderr_>)
at /home/peng/Downloads/git/celix/bundles/shell/shell/src/shell.c:277
   #11 0x00007ffff7f15959 in shellTui_parseInputForControl (shellTui=0x55555559d820, ctx=0x7ffff62a4950)
at /home/peng/Downloads/git/celix/bundles/shell/shell_tui/private/src/shell_tui.c:382
   #12 0x00007ffff7f151e3 in shellTui_runnable (data=0x55555559d820) at /home/peng/Downloads/git/celix/bundles/shell/shell_tui/private/src/shell_tui.c:218
   #13 0x00007ffff7e18609 in start_thread (arg=<optimized out>) at pthread_create.c:477
   #14 0x00007ffff7d3f293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
   (gdb)
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message