celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bjoern Petri (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CELIX-240) RSA: deadlock when stopping
Date Fri, 19 Jun 2015 06:16:00 GMT
Bjoern Petri created CELIX-240:
----------------------------------

             Summary: RSA: deadlock when stopping
                 Key: CELIX-240
                 URL: https://issues.apache.org/jira/browse/CELIX-240
             Project: Celix
          Issue Type: Bug
          Components: Remote Service Admin
            Reporter: Bjoern Petri
            Assignee: Bjoern Petri




When a service is exported and the RSA is shut down first it'll stop the endpoint tracker,
which triggers the call of remoteServiceAdmin_removeExportedService. 

In both cases the access to the list of exported services is protected by a lock. Hence, when
calling  remoteServiceAdmin_removeExportedService the lock is already been locked by remoteServiceAdmin_stop
resulting in a deadlock.


{code}
Thread 54 (Thread 0x7fff597f2700 (LWP 2417)):
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007ffff5ae3657 in _L_lock_909 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007ffff5ae3480 in __GI___pthread_mutex_lock (mutex=0x61da30) at ../nptl/pthread_mutex_lock.c:79
#3  0x00007ffff7741f3e in celixThreadMutex_lock (mutex=0x61da30) at /home/bjoern/Development/celix/git/celix.current.plain/celix/utils/private/src/celix_threads.c:92
#4  0x00007ffff18d9046 in remoteServiceAdmin_removeExportedService (registration=0x6079d0)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c:444
#5  0x00007ffff18da690 in exportRegistration_endpointRemoved (handle=0x6079d0, reference=0x609f10,
service=0x6088e0)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/remote_services/remote_service_admin/private/src/export_registration_impl.c:168
#6  0x00007ffff7bc9ce6 in serviceTracker_untrack (tracker=0x609ac0, reference=0x609f10, event=0x0)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/framework/private/src/service_tracker.c:332
#7  0x00007ffff7bc9590 in serviceTracker_close (tracker=0x609ac0) at /home/bjoern/Development/celix/git/celix.current.plain/celix/framework/private/src/service_tracker.c:142
#8  0x00007ffff18da3ad in exportRegistration_stopTracking (registration=0x6079d0)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/remote_services/remote_service_admin/private/src/export_registration_impl.c:91
#9  0x00007ffff18d83a5 in remoteServiceAdmin_stop (admin=0x61da20)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c:216
#10 0x00007ffff18da181 in bundleActivator_stop (userData=0x61cfd0, context=0x61c980)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/remote_services/remote_service_admin_http/private/src/remote_service_admin_activator.c:102
#11 0x00007ffff7bbcf7f in fw_stopBundle (framework=0x604130, bundle=0x619a30, record=false)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/framework/private/src/framework.c:884
#12 0x00007ffff7bb44dd in bundle_stopWithOptions (bundle=0x619a30, options=0) at /home/bjoern/Development/celix/git/celix.current.plain/celix/framework/private/src/bundle.c:326
#13 0x00007fffc43f1025 in stopCommand_execute (command=0x60e230, line=0x7fff597f1d70 "stop",
out=0x7fffc41e9f65 <shellTui_write>, err=0x7fffc41e9f65 <shellTui_write>)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/shell/private/src/stop_command.c:73
#14 0x00007fffc43f0434 in shell_executeCommand (shell=0x60c800, commandLine=0x7fff597f1d70
"stop", out=0x7fffc41e9f65 <shellTui_write>, error=0x7fffc41e9f65 <shellTui_write>)
    at /home/bjoern/Development/celix/git/celix.current.plain/celix/shell/private/src/shell.c:157
#15 0x00007fffc41ea152 in shellTui_runnable (data=0x60a030) at /home/bjoern/Development/celix/git/celix.current.plain/celix/shell_tui/private/src/shell_tui.c:86
#16 0x00007ffff5ae1182 in start_thread (arg=0x7fff597f2700) at pthread_create.c:312
#17 0x00007ffff724047d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message