Title: Concurrency problem with _lastline in LCDSocketPoller · Issue #4 · lcdproc/lcdjava · GitHub
Open Graph Title: Concurrency problem with _lastline in LCDSocketPoller · Issue #4 · lcdproc/lcdjava
X Title: Concurrency problem with _lastline in LCDSocketPoller · Issue #4 · lcdproc/lcdjava
Description: I've observed crashes like the following: sep 17 11:08:19 raspberrypi java[537]: Exception in thread "Thread-1" java.lang.NullPointerException sep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Matcher.getTextLength(Matcher.java:1...
Open Graph Description: I've observed crashes like the following: sep 17 11:08:19 raspberrypi java[537]: Exception in thread "Thread-1" java.lang.NullPointerException sep 17 11:08:19 raspberrypi java[537]: at java.util.re...
X Description: I've observed crashes like the following: sep 17 11:08:19 raspberrypi java[537]: Exception in thread "Thread-1" java.lang.NullPointerException sep 17 11:08:19 raspberrypi java[537]: a...
Opengraph URL: https://github.com/lcdproc/lcdjava/issues/4
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Concurrency problem with _lastline in LCDSocketPoller","articleBody":"I've observed crashes like the following:\n\n```\nsep 17 11:08:19 raspberrypi java[537]: Exception in thread \"Thread-1\" java.lang.NullPointerException\nsep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Matcher.getTextLength(Matcher.java:1283)\nsep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Matcher.reset(Matcher.java:309)\nsep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Matcher.\u003cinit\u003e(Matcher.java:229)\nsep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Pattern.matcher(Pattern.java:1093)\nsep 17 11:08:19 raspberrypi java[537]: at org.boncey.lcdjava.LCDSocketPoller.run(LCDSocketPoller.java:90)\nsep 17 11:08:19 raspberrypi java[537]: [main] INFO org.boncey.lcdjava.LCD - Connected\n\n```\n\nLooking inside LCDSocketPoller, it's clear that access to _lastline is not concurrency correct. A different thread (inside LCD) can call getLastLine, setting it to null, while the LCDSocketPoller thread is reading _lastline inside the run() loop. This can cause it to be equal to null on line 90, even though there is a not-null-check on line 87.\n\nUsing org.boncey.lcdjava 0.5.0\n","author":{"url":"https://github.com/antoneliasson","@type":"Person","name":"antoneliasson"},"datePublished":"2016-09-17T14:35:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/4/lcdjava/issues/4"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d2f087d4-5f54-7ae4-7f95-15cedca1cb7d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 906A:16E643:435F3D:5AB4E7:698EE06E |
| html-safe-nonce | 27658bb4e5bfb502c620ce0e07f2be7639d6a430b36b90e4d97004b9f6d41380 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDZBOjE2RTY0Mzo0MzVGM0Q6NUFCNEU3OjY5OEVFMDZFIiwidmlzaXRvcl9pZCI6Ijc1OTE4NTA3MzYxMDg4ODgxNzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c226a3de64cbc9d7dcf137acf250d281fb059b3bc4b789ed1cea084f4b26e36e |
| hovercard-subject-tag | issue:177580808 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lcdproc/lcdjava/4/issue_layout |
| twitter:image | https://opengraph.githubassets.com/53c18b8954e0a7ba17b4ca5b1ae7de454251f9272f438b1e076390417b9e00e5/lcdproc/lcdjava/issues/4 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/53c18b8954e0a7ba17b4ca5b1ae7de454251f9272f438b1e076390417b9e00e5/lcdproc/lcdjava/issues/4 |
| og:image:alt | I've observed crashes like the following: sep 17 11:08:19 raspberrypi java[537]: Exception in thread "Thread-1" java.lang.NullPointerException sep 17 11:08:19 raspberrypi java[537]: at java.util.re... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | antoneliasson |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| go-import | github.com/lcdproc/lcdjava git https://github.com/lcdproc/lcdjava.git |
| octolytics-dimension-user_id | 20595616 |
| octolytics-dimension-user_login | lcdproc |
| octolytics-dimension-repository_id | 898160 |
| octolytics-dimension-repository_nwo | lcdproc/lcdjava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 898160 |
| octolytics-dimension-repository_network_root_nwo | lcdproc/lcdjava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width