question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

newInbox hangs on ubuntu trusty after several iterations

See original GitHub issue

The following code:

package com.mvce;

import io.nats.client.Connection;
import io.nats.client.ConnectionFactory;

public class Main {
    public static void main(String [] args) throws Exception {
        ConnectionFactory cf = new ConnectionFactory();
        Connection conn = cf.createConnection();

        String s = "";
        long startingMs = System.currentTimeMillis();
        s = conn.newInbox();
        System.out.println("newInbox complete, took " + (System.currentTimeMillis() - startingMs) + " ms to complete");
        System.exit(0);
    }
}

run on ubuntu/trusty (via docker from OS:X) repeatedly begins taking 2+ minutes to execute newInbox. The first several executions do not take this amount of time - however subsequent attempts do. This is normally 2-5 total executions before the failure behavior begins occurring.

I was using the following scripts to test this:

pom.xml


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mcve</groupId>
    <artifactId>mvce</artifactId>
    <version>0.0.0</version>

    <name>mvce</name>
    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    </properties>

    <dependencies>

        <dependency>
            <groupId>io.nats</groupId>
            <artifactId>jnats</artifactId>
            <version>0.4.1</version>
        </dependency>
    </dependencies>

</project>

Configuring the environment: setup_mvce_linux.sh

#!/usr/bin/env bash

wget -O gnatsd.zip https://github.com/nats-io/gnatsd/releases/download/v0.9.4/gnatsd-v0.9.4-linux-amd64.zip
unzip gnatsd.zip
mv gnatsd-v0.9.4-linux-amd64/gnatsd gnats
chmod 0755 gnats
./gnats -D &

mvn clean compile -U

Running the example: run_mvce.sh

#!/usr/bin/env bash

time mvn exec:java "-Dexec.mainClass=com.mvce.Main" -f="pom.xml"

mvce.zip

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
aldenpeterson-wfcommented, Aug 24, 2016

@mcqueary looks like that flag will get us past the issues we were running into as well.

1reaction
mcquearycommented, Aug 23, 2016

@wallyqs Great suggestion. As I was saying to @aldenpeterson-wf via Slack, I’m pretty sure it has to be something entropy pool-related on Linux, so we can definitely give that a shot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

newInbox hangs on ubuntu trusty after several iterations #57
run on ubuntu/trusty (via docker from OS:X) repeatedly begins taking 2+ minutes to execute newInbox . The first several executions do not take ......
Read more >
What should I do when Ubuntu freezes?
Hover over the offending window and left-click to kill it. Right clicking will cancel and return your mouse to normal. If your program...
Read more >
X/Troubleshooting/Freeze - Ubuntu Wiki
Symptoms. X stops responding to input (sometimes mouse cursor can still move, but clicking has no effect); The screen displays but does not ......
Read more >
[WebRender/EGL] Firefox freezes complete Ubuntu 20.04.1 ...
After updating FF to 89.0.2 and somewhat serendipitously experiencing for some time without a system freeze (Ubuntu 20.04.02 LTS with latest ...
Read more >
Trusty (14.04) - Ubuntu - Launchpad Bugs
#1325801 failed to boot from USB disk with error: gfxboot.c32: not a COM32R Image boot: usb-creator (Ubuntu Trusty) 964. Critical. Incomplete.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found