[Tizen-submit] 19552: Changes to Tizen:IVI/pkgmgr-info

noreply at tizen.org noreply at tizen.org
Fri Jan 10 22:01:08 GMT 2014


Hi,
Brad Peters have made the following changes to pkgmgr-info in project Tizen:IVI. Please review and accept ASAP.

Thank You,

[This message was auto-generated]

---

Request: #19552

  submit:       Tizen:IVI:build/pkgmgr-info(cleanup) -> Tizen:IVI


Message:
Submitter: Brad Peters <brad.t.peters at intel.com>
Comments: Fix amd crash, remove dlclose()
Git project: platform/core/appfw/pkgmgr-info
Tag: submit/tizen/20140110.220142
Commit: bdc192ce0f295ce3296f2f297c1a6fe4cf41c5da Fix amd crash due to call in unmapped callback function

State:   new        2014-01-10T21:58:26 tizenrobot
Comment: <no comment>
changes files:
--------------
--- pkgmgr-info.changes
+++ pkgmgr-info.changes
@@ -0,0 +1,3 @@
+* Fri Jan 10 2014 Chengwei Yang <chengwei.yang at intel.com>
+- Fix amd crash, PTREL-591
+

spec files:
-----------
--- pkgmgr-info.spec
+++ pkgmgr-info.spec
@@ -1,5 +1,5 @@
 Name:       pkgmgr-info
-VCS:        platform/core/appfw/pkgmgr-info#ec0bcf51f1c31ad7db898678e339501e7b82d4f7
+VCS:        platform/core/appfw/pkgmgr-info#bdc192ce0f295ce3296f2f297c1a6fe4cf41c5da
 Summary:    Packager Manager infomation api for package
 Version:    0.0.134
 Release:    1

other changes:
--------------

++++++ pkgmgr-info-0.0.134.tar.gz
--- packaging/pkgmgr-info.changes
+++ packaging/pkgmgr-info.changes
@@ -1,3 +1,6 @@
+* Fri Jan 10 2014 Chengwei Yang <chengwei.yang at intel.com>
+- Fix amd crash, PTREL-591
+
 * Mon Sep 16 2013 Anas Nashif <anas.nashif at intel.com> 2.2_release at 383db6e
 - XML reader check linefeed on manifest parser
 - implement app screen reader
--- src/pkgmgr-info.c
+++ src/pkgmgr-info.c
@@ -7113,7 +7113,28 @@
 	tryvm_if(ret < 0, ret = PMINFO_R_ERROR, "pkgmgr_client_new failed.");
 
 catch:
+        /*
+         * Do not close libpkgmgr-client.so.0 to avoid munmap registered callback
+         *
+         * The lib dependency chain like below
+         * amd --> pkgmgr-info -- dlopen --> libpkgmgr-client --> libpkgmgr-installer-client
+         *
+         * And there is a function in libpkgmgr-installer-client named _on_signal_handle_filter()
+         * which will registered to dbus callback in amd though in fact amd doesn't direct depends
+         * on libpkgmgr-installer-client.
+         *
+         * So when the dlcose happen, then libpkgmgr-installer-client been closed too since no one
+         * link to it then.
+         *
+         * However, when the libdbus call into the callback function, it suddenly fond that the
+         * function address is gone (unmapped), then we receive a SIGSEGV.
+         *
+         * I'm not sure why we're using dlopen/dlclose in this case, I think it's much simple and
+         * robust if we just link to the well-known lib.
+         *
+         * See https://bugs.tizen.org/jira/browse/PTREL-591
 	dlclose(handle);
+         */
 	return ret;
 }
 
@@ -7135,7 +7156,7 @@
 	tryvm_if(ret < 0, ret = PMINFO_R_ERROR, "pkgmgr_client_new failed.");
 
 catch:
-	dlclose(handle);
+        /* same as pkgmgrinfo_client_new */
 	return ret;
 }
 
@@ -7157,7 +7178,7 @@
 	tryvm_if(ret < 0, ret = PMINFO_R_ERROR, "pkgmgr_client_new failed.");
 
 catch:
-	dlclose(handle);
+        /* same as pkgmgrinfo_client_new */
 	return ret;
 }
 


More information about the Tizen-submit mailing list