RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

plovr serve dies with simultaneous requests to multiple modules #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using plovr serve to host code in modules without using the modulemanager to 
load the code asynchronously (ie: just put two script tags in a page) causes 
the plovr server to get in a bad state.

What steps will reproduce the problem?
1. Split code into 2 modules, without using the modulemanager, put script a 
script tag for each module.
2. Run plovr serve
3. Load the page
4. Hit refresh (may have to do this a couple times)

java.lang.RuntimeException: java.lang.IllegalStateException: Incorrect source 
mappings order, previous : (173,172)
new : (0,4)
node : NAME ia 1 [sourcename:  [synthetic] ]

What version of the product are you using? On what operating system?

plovr Jan 04 build

Please provide any additional information below.

stack trace:

java -jar /usr/local/bin/plovr.jar serve config/plovr-config.js
Listening on /0.0.0.0:9810
Jan 25, 2011 1:14:29 PM org.plovr.Manifest getInputs
INFO: Ignoring: 
/Users/myuser/mycompany/projects/acctserv/config/../app/javascripts/mycompany/uj
s/.DS_Store
Jan 25, 2011 1:14:29 PM org.plovr.Manifest getInputs
INFO: Ignoring: 
/Users/myuser/mycompany/projects/acctserv/config/../app/javascripts/mycompany/uj
s/.DS_Store
Jan 25, 2011 1:14:30 PM org.plovr.Config getCompilerOptions
INFO: Compiling with level: ADVANCED_OPTIMIZATIONS
Jan 25, 2011 1:14:30 PM org.plovr.Config getCompilerOptions
INFO: Compiling with level: ADVANCED_OPTIMIZATIONS
Jan 25, 2011 1:14:57 PM org.plovr.AbstractGetHandler handle
SEVERE: Error during GET request to /module/foo/setting
java.lang.RuntimeException: java.lang.RuntimeException: 
java.lang.IllegalStateException: Incorrect source mappings order, previous : 
(2,315)
new : (2,192)
node : NAME ia 1 [sourcename:  [synthetic] ]
    at com.google.javascript.jscomp.Compiler.runCallable(Compiler.java:594)
    at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:540)
    at com.google.javascript.jscomp.Compiler.toSource(Compiler.java:1282)
    at org.plovr.Compilation.getCodeForModule(Compilation.java:214)
    at org.plovr.Compilation.getCodeForModule(Compilation.java:166)
    at org.plovr.ModuleHandler.doGet(ModuleHandler.java:45)
    at org.plovr.AbstractGetHandler.handle(AbstractGetHandler.java:86)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
    at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
    at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:555)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
    at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:527)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: 
Incorrect source mappings order, previous : (2,315)
new : (2,192)
node : NAME ia 1 [sourcename:  [synthetic] ]
    at com.google.javascript.jscomp.Compiler.runCallable(Compiler.java:594)
    at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:540)
    at com.google.javascript.jscomp.Compiler.toSource(Compiler.java:1344)
    at com.google.javascript.jscomp.Compiler$7.call(Compiler.java:1296)
    at com.google.javascript.jscomp.Compiler$7.call(Compiler.java:1282)
    at com.google.javascript.jscomp.Compiler$2.run(Compiler.java:566)
    ... 1 more
Caused by: java.lang.IllegalStateException: Incorrect source mappings order, 
previous : (2,315)
new : (2,192)
node : NAME ia 1 [sourcename:  [synthetic] ]
    at com.google.common.base.Preconditions.checkState(Preconditions.java:172)
    at com.google.javascript.jscomp.SourceMapLegacy.addMapping(SourceMapLegacy.java:241)
    at com.google.javascript.jscomp.CodePrinter$MappedCodePrinter.generateSourceMap(CodePrinter.java:129)
    at com.google.javascript.jscomp.CodePrinter.toSource(CodePrinter.java:615)
    at com.google.javascript.jscomp.CodePrinter.access$100(CodePrinter.java:34)
    at com.google.javascript.jscomp.CodePrinter$Builder.build(CodePrinter.java:577)
    at com.google.javascript.jscomp.Compiler.toSource(Compiler.java:1414)
    at com.google.javascript.jscomp.Compiler.access$400(Compiler.java:65)
    at com.google.javascript.jscomp.Compiler$9.call(Compiler.java:1378)
    at com.google.javascript.jscomp.Compiler$9.call(Compiler.java:1344)
    ... 2 more

Original issue reported on code.google.com by andydun...@gmail.com on 25 Jan 2011 at 9:19

GoogleCodeExporter commented 8 years ago
Appears to be two separate issues, actually. 

1: Plovr serve will reject the second request (not unreasonable, given it's not 
intended to be run in production, though kind of a PITA if you're just using 
the module functionality to split up your code without bothering to do dynamic 
loading)
2: If you refresh fast enough (like I was doing in testing) you get the stack 
trace pasted above and send plovr into a unrecoverable state.

1 is probably more like an enhancement, 2 looks like a bug

Original comment by andydun...@gmail.com on 25 Jan 2011 at 9:38

GoogleCodeExporter commented 8 years ago
I have also seen Broken Pipe exception with concurrent requests to the same 
module.

Original comment by mieli...@gmail.com on 4 Feb 2011 at 10:25

GoogleCodeExporter commented 8 years ago
I believe this should be fixed by 
http://code.google.com/p/plovr/source/detail?r=ff7fb83e4a6b054d2c3a499ac33c6b64d
8198c19

Please sync and build and try it out.

Original comment by bolinf...@gmail.com on 16 Jun 2011 at 9:33

GoogleCodeExporter commented 8 years ago
I've started getting this, could it be related? This is with plovr rev 
a796bd1a9239, called from my Grails application (so I don't have a way to 
reproduce it with the standalone server, sorry).

Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: 
Incorrect source mappings order, previous : (653,52)
new : (0,42)
node : %s
        at com.google.javascript.jscomp.Compiler.runCallable(Compiler.java:625)
        at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:571)
        at com.google.javascript.jscomp.Compiler.toSource(Compiler.java:1402)
        at com.google.javascript.jscomp.Compiler$5.call(Compiler.java:1300)
        at com.google.javascript.jscomp.Compiler$5.call(Compiler.java:1290)
        at com.google.javascript.jscomp.Compiler$2.run(Compiler.java:597)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalStateException: Incorrect source mappings order, 
previous : (653,52)
new : (0,42)
node : %s
        at com.google.common.base.Preconditions.checkState(Preconditions.java:172)
        at com.google.debugging.sourcemap.SourceMapGeneratorV2.addMapping(SourceMapGeneratorV2.java:212)
        at com.google.javascript.jscomp.SourceMap.addMapping(SourceMap.java:113)
        at com.google.javascript.jscomp.CodePrinter$MappedCodePrinter.generateSourceMap(CodePrinter.java:131)
        at com.google.javascript.jscomp.CodePrinter.toSource(CodePrinter.java:640)
        at com.google.javascript.jscomp.CodePrinter.access$100(CodePrinter.java:35)
        at com.google.javascript.jscomp.CodePrinter$Builder.build(CodePrinter.java:595)
        at com.google.javascript.jscomp.Compiler.toSource(Compiler.java:1487)
        at com.google.javascript.jscomp.Compiler.access$400(Compiler.java:68)
        at com.google.javascript.jscomp.Compiler$9.call(Compiler.java:1438)
        at com.google.javascript.jscomp.Compiler$9.call(Compiler.java:1402)
        ... 2 more

Original comment by mar...@better.se on 11 Aug 2011 at 10:01