Visitar URL original
android_instrumentation_test: adb forked server process is kept alive after tests · Issue #4853 · bazelbuild/bazel · GitHub
Skip to content

android_instrumentation_test: adb forked server process is kept alive after tests #4853

Closed as not planned

Description

@jin

When an android_instrumentation_test completes, the forked adb servers are not cleaned up and it leads to this:

$ ps -ef | grep "adb -L" | head -n 20
jingwen    1324      1  0 Mar08 ?        00:02:14 adb -L tcp:43431 fork-server server --reply-fd 4
jingwen    1341      1  0 Feb22 ?        00:07:54 adb -L tcp:34863 fork-server server --reply-fd 4
jingwen    1524      1  0 Mar08 ?        00:02:14 adb -L tcp:47685 fork-server server --reply-fd 4
jingwen    1819      1  0 Mar08 ?        00:02:14 adb -L tcp:48743 fork-server server --reply-fd 4
jingwen    2997      1  0 Mar08 ?        00:02:15 adb -L tcp:46017 fork-server server --reply-fd 4
jingwen    5641      1  0 Mar08 ?        00:02:13 adb -L tcp:46847 fork-server server --reply-fd 4
jingwen   13835      1  0 Mar09 ?        00:01:52 adb -L tcp:56177 fork-server server --reply-fd 4
jingwen   14132      1  0 Mar09 ?        00:01:52 adb -L tcp:43189 fork-server server --reply-fd 4
jingwen   14462      1  0 Mar09 ?        00:01:51 adb -L tcp:38136 fork-server server --reply-fd 4
jingwen   16700      1  0 Mar13 ?        00:00:28 adb -L tcp:58003 fork-server server --reply-fd 4
jingwen   16782      1  0 Mar09 ?        00:01:52 adb -L tcp:44387 fork-server server --reply-fd 4
jingwen   16801      1  0 Mar13 ?        00:00:28 adb -L tcp:40415 fork-server server --reply-fd 4
jingwen   16847      1  0 Mar13 ?        00:00:27 adb -L tcp:35975 fork-server server --reply-fd 4
jingwen   16855      1  0 Mar13 ?        00:00:27 adb -L tcp:39873 fork-server server --reply-fd 4
jingwen   16897      1  0 Mar13 ?        00:00:28 adb -L tcp:56468 fork-server server --reply-fd 4
jingwen   16916      1  0 Mar13 ?        00:00:27 adb -L tcp:50113 fork-server server --reply-fd 4
jingwen   16924      1  0 Mar13 ?        00:00:27 adb -L tcp:45304 fork-server server --reply-fd 4
jingwen   16970      1  0 Mar13 ?        00:00:27 adb -L tcp:45695 fork-server server --reply-fd 4
jingwen   16978      1  0 Mar13 ?        00:00:27 adb -L tcp:56224 fork-server server --reply-fd 4
jingwen   17821      1  0 10:53 ?        00:00:06 adb -L tcp:44386 fork-server server --reply-fd 4

Activity

  1. self-assigned this
    on Mar 14, 2018
  2. jin commented on Mar 15, 2018

    @jin
    MemberAuthor

    dbus-daemon as well:

    $ ps -ef | grep dbus-daemon | head -n 20
    jingwen     480      1  0 Mar08 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    message+   1058      1  0 Feb01 ?        00:23:04 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
    jingwen    4428      1  0 Mar08 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    4658      1  0 Feb01 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    4665   4660  0 Feb01 ?        00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
    lightdm    4719      1  0 Feb01 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    4787      1  0 Mar14 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    4909      1  0 Feb01 ?        00:00:09 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    4959   4954  0 Feb01 ?        00:00:37 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
    jingwen    9930      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    9969      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    9974      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    9997      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen    9998      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen   10000      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen   10001      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen   10002      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen   10044      1  0 Mar13 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen   12210      1  0 Mar14 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    jingwen   12233      1  0 Mar14 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    
  3. mrk-han commented on Mar 18, 2019

    @mrk-han

    @jin Is this still an issue? What causes an adb server to become forked?

  4. jin commented on Mar 18, 2019

    @jin
    MemberAuthor

    I haven't seen this issue occur personally for a while, but I know some users, both internal and external, have seen it recently.

    My hunch is that the emulator launcher is not properly killing the servers after shutting down, but I haven't looked into that further.

  5. added
    P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)
    and removed
    P2We'll consider working on this in future. (Assignee optional)
    on Jun 19, 2019
  6. jin commented on Jun 19, 2019

    @jin
    MemberAuthor

    Downgrading to P4 as there's a new emulator launcher in the works.

  7. removed their assignment
    on Jun 19, 2019
  8. github-actions commented on Feb 28, 2023

    @github-actions

    Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 3 years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

  9. added
    staleIssues or PRs that are stale (no activity for 30 days)
    on Feb 28, 2023
  10. github-actions commented on Mar 15, 2023

    @github-actions

    This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)team-AndroidIssues for Android teamtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions