Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I8f115a821731b01727bc19510962f9b7720f3d89
|
|
|
|
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ib7372970eb1a1e24154de189848cd0ca2faa2563
|
|
The dbus source includes dbus.socket and dbus.service for user session.
But tizen uses its own files.
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ied720b0fd5e792845ab626f680d01cbb3e9b2db9
|
|
Change-Id: I2e1785ef0d14c2d5a9aa1d49904064b4fe80f9ee
|
|
For disconnection connections, _dbus_connection_get_dispatch_status_unlocked always returns DBUS_DISPATCH_DATA_REMAINS.
So __bus_loop_dispatch is going around in an infinite loop.
If _dbus_loop_dispatch is out of the loop, _dbus_connection_get_dispatch_status_unlocked returns DBUS_DISPATCH_COMPLETE as normal.
It is dead-lock.
====================== reproduce ==================
su - owner
dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness
dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness
dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness
dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness
dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness
===================================================
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I8565a757a62b50a27d2c6b6931e125af452ff74e
|
|
dbus_connection_get_is_connected ()
Since dbus-daemon uses asynchronous cynara functions, some cynara functions are delayed.
In the cynara delay function, check if connection is valid or not.
If the connection is lost, the "connection->slot_list" is cleared. So bus_connection_is_active() will cause crash.
Since dbus_connection_get_is_connected() only checks for "connection->transport->disconnected" variables, it works fine if only the reference count is valid.
====================================================================================================================================
0 bus_connection_is_active (connection=<optimized out>) at connection.c:1291
1 0xb6f08134 in bus_deferred_message_dispatch (deferred_message=0xb7c93668) at check.c:498
2 0xb6f0c7ce in bus_connection_dispatch_deferred (connection=0xb7ca0008) at connection.c:2677
3 0xb6f0826a in bus_check_queued_message_reply_callback (deferred_message=0xb7cb5870, result=<optimized out>) at check.c:188
4 0xb6f0cdda in bus_cynara_check_response_callback (check_id=<optimized out>, cause=<optimized out>, response=<optimized out>, user_response_data=0xb7cb5870) at cynara.c:333
5 0xb6db2994 in Cynara::Logic::processCheckResponse (this=this@entry=0xb7c0cdb8, checkResponse=...) at /usr/src/debug/cynara-0.14.7/src/client-async/logic/Logic.cpp:277
6 0xb6db3a8e in Cynara::Logic::processResponses (this=this@entry=0xb7c0cdb8) at /usr/src/debug/cynara-0.14.7/src/client-async/logic/Logic.cpp:324
7 0xb6db4578 in Cynara::Logic::processIn (this=this@entry=0xb7c0cdb8) at /usr/src/debug/cynara-0.14.7/src/client-async/logic/Logic.cpp:348
8 0xb6db45d8 in Cynara::Logic::process (this=0xb7c0cdb8) at /usr/src/debug/cynara-0.14.7/src/client-async/logic/Logic.cpp:175
9 0xb6daf35a in operator() (this=<optimized out>) at /usr/lib/gcc/armv7l-tizen-linux-gnueabi/4.9.2/include/c++/functional:2439
10 Cynara::tryCatch(std::function<int ()> const&) (func=...) at /usr/src/debug/cynara-0.14.7/src/common/exceptions/TryCatch.h:42
11 0xb6dafa5e in cynara_async_process (p_cynara=0xb7c0c7a0) at /usr/src/debug/cynara-0.14.7/src/client-async/api/client-async-api.cpp:236
12 0xb6f0cdb4 in bus_cynara_watch_callback (watch=<optimized out>, flags=<optimized out>, data=<optimized out>) at cynara.c:288
13 0xb6f14f5a in _dbus_loop_iterate (loop=loop@entry=0xb7c0b618, block=block@entry=1) at dbus-mainloop.c:819
14 0xb6f1506c in _dbus_loop_run (loop=0xb7c0b618) at dbus-mainloop.c:883
15 0xb6f046f6 in main (argc=<optimized out>, argv=<optimized out>) at main.c:661
(gdb) info locals
d = 0x0
(gdb) f 1
(gdb) p *deferred_message->sender
$27 = {refcount = {value = 1}, mutex = 0xb7c41c70, dispatch_mutex = 0xb7c41cb0, dispatch_cond = 0xb7c41cd0, io_path_mutex = 0xb7c41c90, io_path_cond = 0xb7c41d08, outgoing_messages = 0x0, incoming_messages = 0x0, expired_messages = 0x0, message_borrowed = 0x0,
n_outgoing = 0, n_incoming = 0, outgoing_counter = 0xb7c41df8, transport = 0xb7c41778, watches = 0xb7c41b20, timeouts = 0xb7c41b40, filter_list = 0x0, slot_mutex = 0xb7c41d40, slot_list = {slots = 0xb7c41fc0, n_slots = 1}, pending_replies = 0xb7c41b60,
client_serial = 10, disconnect_message_link = 0x0, wakeup_main_function = 0x0, wakeup_main_data = 0x0, free_wakeup_main_data = 0x0, dispatch_status_function = 0x0, dispatch_status_data = 0x0, free_dispatch_status_data = 0x0, last_dispatch_status = DBUS_DISPATCH_COMPLETE,
objects = 0xb7c41f20, server_guid = 0x0, peer_smack_label = 0xb7c41c60 "System", dispatch_acquired = 0, io_path_acquired = 0, dispatch_disabled = 0, shareable = 0, exit_on_disconnect = 0, route_peer_messages = 1, disconnected_message_arrived = 1,
disconnected_message_processed = 1, have_connection_lock = 0, generation = 1}
(gdb) p deferred_message->sender->slot_list
$28 = {slots = 0xb7c41fc0, n_slots = 1}
(gdb) p *deferred_message->sender->slot_list->slots
$31 = {data = 0x0, free_data_func = 0x0}
(gdb) p connection_data_slot
$32 = 0
(gdb) p deferred_message->sender->slot_list->slots[0]
$35 = {data = 0x0, free_data_func = 0x0}
(gdb) p deferred_message->sender->transport->disconnected
$33 = 1
====================================================================================================================================
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Iab2abfb63030d15e380e11c057ee1f99124e102e
(cherry picked from commit 62fd017b7dbf577f736de7f8d44e6a94b4334472)
|
|
After applying unify build, all profiles build kdbus unconditionally even if you do not use kdbus.
Before unify build, kdbus was not enabled in emulator64-wayland environment.
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I22f8dd17cdfeed17a3ef7aa8da5c738fc677f0ad
|
|
- Please add "dbus-libs-extension-kdbus" for TV/arm-wayland images via JIRA-TRE issue.
- Without this commit, this package won't be built correctly in Tizen 4.0.
Change-Id: I94d98f44cad637af2acc22898c74a806e74f73bb
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Reviewed-by: Insun Pyo <insun.pyo@samsung.com>
|
|
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I8809374f28baae65606b679b3ef15fc71a91f98d
|
|
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Iad33b6770458d2e3e4e8507cfae5b1489da5bf0c
(cherry picked from commit e1a4cf929e2095ae0bd1e503a59388791e18e1cb)
|
|
patch from upstream
https://cgit.freedesktop.org/dbus/dbus/commit/?id=529600397bcab47b9bed5da9208c2df05c8b86b4
author Michal Koutn? <mkoutny@suse.com> 2016-05-24 09:14:11 (GMT)
committer Simon McVittie <smcv@debian.org> 2017-02-01 10:42:50 (GMT)
commit 529600397bcab47b9bed5da9208c2df05c8b86b4 (patch)
tree 17e9af27f973a4e0132ee23e405ed7d52fdb0771
parent befd186c0b005f1e1130cb3e4923c689085a8dbc (diff)
bus: Fix timeout restarts
The code counting pending fds relied on restart of timeouts when they are
enabled. This patch adds function that ensures that such enabled timeouts
have their timekeeping data reset (and not only when timeout is
registered into event loop processing).
When timeouts weren't reset, they'd fire at rather random and mainly
incorrect moments leading to interruption of connections of dbus-daemon.
Every time we reset the interval, we also need to re-enable the timeout
and mark its end time to be recalculated by the event loop, so combine
the old set_enabled(TRUE) with set_interval() as a new restart() method.
This leaves all the set_enabled() calls having a FALSE parameter, so
remove the parameter and rename the method to disable().
[smcv: fix minor coding style issues]
[smcv: replace set_reenabled()/set_interval() pair with restart()]
[smcv: replace set_enabled(FALSE) with disable()]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95619
Change-Id: Ia80641554800ae09ae22d4615b87eda0697c5f3e
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
* changes:
tests: general fix for tests setup
tests: generating coverage version of the library
|
|
/usr/lib/systemd/user/sockets.target.wants/dbus.socket
Until now, dbus.socket of user session was not running in the sockets.target.
dbus.socket has been triggered by dbus.service's dependencies.
The dbus.service is included in basic.target.
Therefore, there are some dependency issues.
If a service runs before dbus.service, the service can not accesses dbus system.
(Since dbus.socket is not yet activated, so you can not make a dbus connection.)
I have modified dbus.service to be explicitly run in sockets.target.
On the session bus, sockets.target is guaranteed to run before all services.
Signed-off-by: INSUN PYO <insun.pyo@ubuntu1604.playinsun.pe.kr>
Change-Id: Ic46f1a46b458e2017b0025c6e564ac1204eb8cc8
(cherry picked from commit 1beb067e73478b3948980eb19e379a8986dc365a)
|
|
into tizen
|
|
This commit works around systemd -> dbus -> (nss) -> systemd deadlock
occuring in Tizen.
Situation is depicted on diagram below:
systemd dbus nss
| . .
| . .
1> reads config . .
| . .
2> reg. nofification . .
| for dbus.service . .
| . .
| . .
3> exec. services . .
| | . .
| (start srv...) . .
| | . .
| 4>------------(exec) .
| | .
*-<---(notification)=<| .
\ | .
.\> call dbus.serv | .
. handler | .
. | 4a> read config .
. |> conn. to bus | .
. | 4b> resolve user .
. |> call dbus . and groups .
. \ . initgroups() .
. ------------>. | .
. (blocking) . \---------->select module
. . (blocking) based on conf.
. . |
(below not executed) . |> security-manager
. . | module selected
. . |
. . |
[sec-manager.socket]<---------------------<| call security-manager
. . (DEADLOCK) . on unix socket
. . .
Solid line (|) means active thread of execution, dot (.) means
code not executed (blocked).
The root cause of the problem is that systemd calls external
API in blocking manner, which, due to system configuration, requires
systemd to handle its request for successful completion.
(systemd should start security-manager service via sec-manager.socket
activation).
The exact place this situation is triggered is in dbus' initialization.
This commits works around this problem by delaying dbus.service readyness
notification - effectively - resolving the problem.
Situation becomes:
systemd dbus nss security-manager
| . . .
| . . .
1> reads config . . .
| . . .
2> reg. nofification . . .
| for dbus.service . . .
| . . .
| . . .
3> exec. services . . .
| | . . .
| (start srv...) . . .
| | . . .
| 4>------------(exec) . .
| | . .
| | . .
| | . .
| | . .
| | . .
| 4a> read config . .
| | . .
| 4b> resolve user . .
| . and groups . .
| . initgroups() . .
| . | . .
| . \---------->select module .
| . (blocking) based on conf. .
| . | .
| . |> security-manager .
| . | module selected .
| . | .
| . | .
[sec-manager.socket]<---------------------<| call security-manager .
. | . . on unix socket .
. | . .
. |> exec service ----------------------------------------------->(exec)
. | . . |
<--| . |<-------------------------<| handle call
| . | |
| |<-----------------| |
| | . |
| | . |
.\> call dbus.serv |>finish conf. file. |
. handler | parsing . |
. | | . |
*-<---(notification)-<|> explicitly . |
.\ | | notify startup . |
. \> call dbus.serv | finished . |
| handler | . |
. | | . |
. |> conn. to bus | . |
. | | . |
. |> call dbus | . |
. \ | . |
. ------------>* dispatch loop . |
. (blocking) | . |
. | . |
|<--------------------< handle call . |
| | . |
Change-Id: Ifeaf299fc8653b583cd06ca9fd4f9f8045a2bde0
|
|
The adbd's privilege has been changed form "System::Privileged" to "User::Shell".
So, pgrep does not work with smack errors when accessing /proc.
If it fails to find DBUS address, the fixed address is used.
Signed-off-by: INSUN PYO <insun.pyo@ubuntu1604.playinsun.pe.kr>
Change-Id: I4f9e0bc0939de2ecd7b866df8a2f266b4258338b
(cherry picked from commit 4f11f164f44d78ec6a54892e5d4095ca52e7117d)
|
|
Before this patch tests were installed into custom directory
/usr/lib/dbus-tests/test-suites/dbus-tests
Originally, dbus wants its installed tests in
/usr/lib/dbus/installed-tests/dbus
This path seems to be partially hardcoded in the configuration
files - it relies on defined datadir. As datadir is used
also for something else than tests, we don't want to change it.
This commit switches installation directory to the original,
and adds symbolic links in our custom directory.
Change-Id: Icf330ba3b5be59ee941d51b15a8f78a082297846
|
|
Additionally:
- immediate output of test results instead of caching and printing
at the end;
- removed manual-authz test, because it is not meant to be run
automatically.
Change-Id: I7354c21e0fa457ad7e2a4a53e1c898e5039b7f73
|
|
Change-Id: Ic1960a3b70df234a3e9ad141d6c335d373c331ec
|
|
This merge commit adds integration tests.
Change-Id: I2b0ecb3c48fec72a6be1a7d6406b5580bbb38ec8
|
|
Change-Id: I2e509fe1a4f275c9f5b35290bdd2d218c4b3692a
(cherry picked from commit 4f9a3114261606c3edf84655b2e5752dee33585f)
|
|
Change-Id: I2e509fe1a4f275c9f5b35290bdd2d218c4b3692a
|
|
Change-Id: I127f90398b4fe33b3c3b412ef84a42ab2683efd5
(cherry picked from commit 44c73590bab90e63b21fadfffadbfa1d745d9613)
|
|
Change-Id: I127f90398b4fe33b3c3b412ef84a42ab2683efd5
|
|
Change-Id: Icf4a2b514abfeb458305c58ab99aad4cfbab325d
(cherry picked from commit 4b5af3aba73865b45a144694fa9c918ed7f9233e)
|
|
Change-Id: Icf4a2b514abfeb458305c58ab99aad4cfbab325d
|
|
Change-Id: I0175a6c710e418be7f3b06f1df6ad13396e40f8c
Signed-off-by: Krystian Kisielak <k.kisielak@samsung.com>
|
|
There is a requirement for fixed-size tuples:
size of such tuple must be a multiply of its required alignment.
That part was overlooked in the implementation.
This commit adds padding accounting for both reading and writing.
Change-Id: I0825be6436b93b836dc333f5a395fdf1021f2a06
|
|
Change-Id: If84df57e9985f484e3c3c63854df5ff666cc1794
|
|
Change-Id: Ifcc7dacb077615c8f5392a6b213d402d4775af05
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
Change-Id: I3d9aa7f2d608e6706600a87ad5dc570033244f98
|
|
To keep compatibility with dbus1, GetConnectionSELinuxSecurityContext
method call should always return SELinuxSecurityContextUnknown error
on systems without SELinux (even if other LSM systems, like for example
SMACK, are available on platform).
Change-Id: I347cdf665a03fc047d267752b23c4503bf5218e3
|
|
|
|
Change-Id: I9fd1720e5c2a1edaa1fcd66b78df0b0238e9ce9f
|
|
Change-Id: I1eb91da587469381f69ada2939a980d8ea1f40e1
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
Change-Id: I6f7c2e39c8872ebae8a68157515ef247325b3cc4
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
default.target.wants to basic.target.wants
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I5ec89ce65fe196d54a4b130e41a83a82acb40101
|
|
http://suprem.sec.samsung.net/confluence/display/SFH/Lazy+mount
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I4b9f4a435f2aae9215bb7d77bb423715884d01e1
|
|
|
|
Change-Id: Ib8a1c138983124a2597b0c700f5c6a2c7dd4744e
|
|
Additionally, added some documentation for _kdbus_list().
Change-Id: I267100ec123f33a1b10f3ce1c9aca3004ac1e9fc
|
|
|
|
Change-Id: I8710e8d2ff1911ea11b48984ebda227a0a8658fe
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
|
|
Change-Id: I0f5c1882a9ffcc9a0186a834ad73e72a10b9f239
|
|
|
|
|
|
Change-Id: I683f77755c6fefafbcc255107839f10362abadb0
|
|
Change-Id: Icc74194668757c9e7ebc79d63d4a3b2ec65d0c34
|
|
Change-Id: Ib10e3eb7c102f63a5d63c550858ad4a5edee8c2b
|