Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gentoo gets the "The system is out of resources." error on x86 in test phase. #890

Open
vaukai opened this issue Apr 27, 2024 · 4 comments

Comments

@vaukai
Copy link

vaukai commented Apr 27, 2024

The downstream bug report is https://930723.bugs.gentoo.org/attachment.cgi?id=891802.
Need to add, Gentoo does not use Maven or Gradle but builds directly with javac.
Can you help?

Adding the log from mvn test: https://930723.bugs.gentoo.org/attachment.cgi?id=891918

[INFO] Tests run: 288, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.043 s -- in org.json.junit.JSONObjectNumberTest
[INFO] Running org.json.junit.JSONObjectTest
new BigDecimal(testData[]) : 42 ms
NUMBER_PATTERN.matcher(testData[]).matches() : 38 ms
[ERROR] Tests run: 108, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 0.457 s <<< FAILURE! -- in org.json.junit.JSONObjectTest
[ERROR] org.json.junit.JSONObjectTest.issue743SerializationMapWith1000Objects -- Time elapsed: 0.012 s <<< ERROR!
java.lang.StackOverflowError
	at org.json.JSONObject.wrap(JSONObject.java:2645)
	at org.json.JSONObject.wrap(JSONObject.java:2618)
	at org.json.JSONObject.<init>(JSONObject.java:314)
@matoro
Copy link

matoro commented Apr 29, 2024

Just a couple additions, I am the original reporter. x86 here refers to 32-bit (i686), and the issue does reproduce even with mvn test.

@stleary
Copy link
Owner

stleary commented May 1, 2024

@vaukai @matoro Thanks for posting.
I cannot recreate this bug. I am guessing it might be a resource problem with your build config, but for some reason you have to run the unit tests on it. What would you consider to be an acceptable solution to this issue?

@matoro
Copy link

matoro commented May 1, 2024

@vaukai @matoro Thanks for posting. I cannot recreate this bug. I am guessing it might be a resource problem with your build config, but for some reason you have to run the unit tests on it. What would you consider to be an acceptable solution to this issue?

We're distro maintainers validating that the package works on our supported architectures, which includes 32-bit x86, and passing the test suite is what we use as the primary indication the package works.

If by resource problem you mean system resources, that's definitely not the case, as the tests pass just fine in a 64-bit environment on the same host. What process did you use to recreate the bug? This requires a 32-bit chroot or 32-bit install.

@stleary
Copy link
Owner

stleary commented May 1, 2024

Ah, OK, that explains why it doesn't recreate for me. Testing the ability to handle deeply nested JSON docs is important, but I suppose the actual number can be adjusted. Do you want to try tweaking the number of objects created in that test to find your upper limit?

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

No branches or pull requests

3 participants