Git Product home page Git Product logo

Comments (20)

nordicway avatar nordicway commented on July 26, 2024 1

that's good to know, I will test it on Linux soon.

from moji.

nordicway avatar nordicway commented on July 26, 2024

I've never encountered this personally, but I've seen some reports in the last years that turned out to be issues with a firewall or other connection issues.
Your report is interesting because you tested it against the official client, though.

Can you post the stack trace, please?
Is this an especially large source code directory you're trying to upload? How long does it take before you receive an exception?

from moji.

RoxaneKoitz avatar RoxaneKoitz commented on July 26, 2024

I think I am observing the same issue, when I am trying to check around 800 source files. It takes around 4 seconds till I receive the exception.

The stack trace:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:209)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.readLine(BufferedReader.java:324)
at java.io.BufferedReader.readLine(BufferedReader.java:389)
at moss.SocketClient.readFromServer(SocketClient.java:219)
at moss.SocketClient.sendQuery(SocketClient.java:381)

from moji.

rahulkhanna89 avatar rahulkhanna89 commented on July 26, 2024

Is there any resolution for this issue? Even I am facing the same issue of connection reset.

from moji.

bohdan-romanchenko avatar bohdan-romanchenko commented on July 26, 2024

mvn test - Tests run: 15, Failures: 11, Errors: 0, Skipped: 0
All are with "Connection reset"

from moji.

nordicway avatar nordicway commented on July 26, 2024

@nadman3
I am now trying to hunt this down in the "dev" branch. Please test this one as well.

This might also be an encoding or filesystem related problem that I cannot reproduce because of different JVM defaults. What's your JVM default encoding?
Can you attach the complete console output of "mvn test", please?

from moji.

bohdan-romanchenko avatar bohdan-romanchenko commented on July 26, 2024

https://docs.google.com/document/d/1w7-aRw91EWLfb0ckln29PhPsIbtPMK7EIh27sDOrnBA/edit?usp=sharing
Here is file with log.

And my JVM default encoding is UTF-8

from moji.

nordicway avatar nordicway commented on July 26, 2024

Thanks. That's a bug in the test code itself which is now fixed on the dev branch. It cannot have caused connection resets when running against the actual Moss server though.

This ticket will remain open until there is a fix for the sporadic connection resets that were reported, if there is any.
If you come across this problem, please try it again using the dev branch, report the issue here and attach

  • the console output of the client
  • the source code file that the client tried to upload last
  • the "mvn test" console output

from moji.

bohdan-romanchenko avatar bohdan-romanchenko commented on July 26, 2024

from moji.

nordicway avatar nordicway commented on July 26, 2024

I cannot reproduce the exception with these files, neither on the dev branch nor on master. Didn't test it with your client though.
Do you call MOJI from your Swing draw thread or anything?

I am using the quickstart client with these settings:

Collection files = FileUtils.listFiles(new File(
"D:\temp\mossdevtest"), new String[] { "cpp" }, true);
socketClient.setLanguage("cc");

and one source code file per subdirectory.

from moji.

bohdan-romanchenko avatar bohdan-romanchenko commented on July 26, 2024

I noticed that on my Windows operating system all works well, but Linux does not. But on my friends Windows OS is the same error.
I also use these settings for quickstart

Collection files = FileUtils.listFiles(new File("D:\temp\mossdevtest"), new String[] { "cpp" }, true);
socketClient.setLanguage("cc");

And my directories looks like you said too...

and one source code file per subdirectory.

from moji.

bohdan-romanchenko avatar bohdan-romanchenko commented on July 26, 2024

But mvn test on Linux works without exceptions. Try to use your client on Linux with my source codes.

from moji.

nordicway avatar nordicway commented on July 26, 2024

I finally got around to try it on Linux. It worked with my test files, but I will try your test files tomorrow.

from moji.

nordicway avatar nordicway commented on July 26, 2024

Bug confirmed. Need to get a deeper look at the packet data to fix this.

from moji.

nordicway avatar nordicway commented on July 26, 2024

Might be fixed with the latest changes in the dev branch. I have to try some more test files to be sure.

@nadman3 : may I anonymize your test set and add it as a test?

from moji.

bohdan-romanchenko avatar bohdan-romanchenko commented on July 26, 2024

Of course you can. No problem. I'll try to use your version from dev branch

from moji.

bohdan-romanchenko avatar bohdan-romanchenko commented on July 26, 2024

Can you send me your test files? I'll test my program with them while program will not work correctly.

from moji.

nordicway avatar nordicway commented on July 26, 2024

v1.0.2 should fix this issue since it is binary compatible now, or so it seems.

I used the test set you gave me and compared the binary output for a dozen of files against the official Moss client.
And then I used the one from https://github.com/nordicway/SourceCode-Plagiarism-TestSets - but that always worked.

from moji.

bohdan-romanchenko avatar bohdan-romanchenko commented on July 26, 2024

Great! It really works. Thank you so much 👍
I think that issue may be closed

from moji.

nordicway avatar nordicway commented on July 26, 2024

You're welcome. Thanks for tracking it down with me!

from moji.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.