Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • briar briar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 783
    • Issues 783
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briar
  • briarbriar
  • Issues
  • #1777

Closed
Open
Created Sep 18, 2020 by akwizgran@akwizgranOwner

IllegalStateException when BriarService is recreated after startup

  • Android version: 5.1.1
  • Phone model: Samsung SM-J320M (j3xlteub)
  • Briar version: 1.2.7 (eb562f8f)

Stacktrace:

java.lang.IllegalStateException
        at org.briarproject.bramble.network.AndroidNetworkManager.startService(AndroidNetworkManager.java:71)
        at org.briarproject.bramble.lifecycle.LifecycleManagerImpl.startServices(LifecycleManagerImpl.java:130)
        at org.briarproject.briar.android.BriarService.lambda$onCreate$0$BriarService(BriarService.java:133)
        at org.briarproject.briar.android.-$$Lambda$BriarService$Ihm6XxaER2EMRlAKzUA1GpEtxZU.run(lambda)
        at java.lang.Thread.run(Thread.java:818)

Edited log:

06-04 12:25:55.414 I/TorPlugin: First circuit built
06-04 12:25:55.424 I/PollerImpl: Polling plugin org.briarproject.bramble.tor
06-04 12:25:55.428 I/TorPlugin: Connecting to sak[scrubbed]
06-04 12:26:25.431 I/TorPlugin: Could not connect to sak[scrubbed]: java.net.SocketTimeoutException
06-04 12:26:27.252 I/BaseActivity: Starting NavDrawerActivity
06-04 12:26:27.266 I/BriarService: Created
06-04 12:26:27.273 I/LifecycleManagerImpl: Opening database
06-04 12:26:27.299 I/H2Database: Reopening DB: true
06-04 12:26:27.306 I/JdbcDatabase: 2217908857 ms since last compaction
06-04 12:26:27.328 I/LifecycleManagerImpl: Starting services

The exception is a canary that's meant to warn us about singletons being reused in violation of their expected lifecycle.

The log shows that TorPlugin and PollerImpl were already running before BriarService was created. The database must have been open too, as the poller was able to load a contact's transport properties.

It looks like a new BriarService instance was created when one already existed, or used to exist. The BriarService instance also has a canary to check for reuse, so this must be a new instance.

Assignee
Assign to
Time tracking