Return-Path: X-Original-To: apmail-celix-commits-archive@www.apache.org Delivered-To: apmail-celix-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3C3118ED8 for ; Fri, 19 Jun 2015 06:16:00 +0000 (UTC) Received: (qmail 11484 invoked by uid 500); 19 Jun 2015 06:16:00 -0000 Delivered-To: apmail-celix-commits-archive@celix.apache.org Received: (qmail 11456 invoked by uid 500); 19 Jun 2015 06:16:00 -0000 Mailing-List: contact commits-help@celix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@celix.apache.org Delivered-To: mailing list commits@celix.apache.org Received: (qmail 11446 invoked by uid 500); 19 Jun 2015 06:16:00 -0000 Delivered-To: apmail-incubator-celix-commits@incubator.apache.org Received: (qmail 11443 invoked by uid 99); 19 Jun 2015 06:16:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 06:16:00 +0000 Date: Fri, 19 Jun 2015 06:16:00 +0000 (UTC) From: "Bjoern Petri (JIRA)" To: celix-commits@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CELIX-240) RSA: deadlock when stopping MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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 , err=0x7fffc41e9f65 ) 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 , error=0x7fffc41e9f65 ) 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)