Opened 15 years ago
Closed 12 years ago
#1239 closed defect (fixed)
On Centos 5.4 x86, Mapguide 2.0.2 Java API crashes Java VM. In debug mode of web throws an exception
Reported by: | rksingh05 | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 2.5 |
Component: | General | Version: | 2.0.2 |
Severity: | blocker | Keywords: | Java Web Crash |
Cc: | rajeev@… | External ID: |
Description (last modified by )
We built Mapguide 2.0.2 (tar downloaded from web site) on Centos Linux 5.5.4 (with some effort - build scripts are available if desired). Non java-web portions works fine (except for a font issue) on sheboygan. However the java web portion casues the Java VM to crash at site.open(). Subsequently we create a small Java application to reproduce and get rid of possible tomcat related issues. The application crashed alongwith a stack trace. We then did debug build of just the web component and the VM does not crash but shows certain exceptions happening in MapGuide/JNI side.
Connecting to the same server from a windows TomCat works fine (except for the aforementioned font issue)
The calls never reach the MgServer. Note that the attached webconfig.ini has 192.168.1.95 as the address for the site server.
Following files are being attached:
TestMg.java - a simple application that does site.open (Please set the path of webconfi.ini to your requirement). Crash/Exception happens at site.open
webconfig.ini - the ini file being used
vmcrashreport.err.txt - the error file generated when VM crashed in non-debug build mode
console.op.txt - the output of console showing the issue. the same is also being copy-pasted here
Script started on Sun 10 Jan 2010 07:44:06 PM IST
javac -classpath .:/usr/local/mapguideopensource/webse erverextensions/www/WEB-INF/lib/MapGuideApi.jar TestgM.java
java -classpath .:/usr/local/mapguideopensource/webser rverextensions/www/WEB-INF/lib/MapGuideApi.jar -Djava.library.path=/usr/local/map pguideopensource/webserverextensions/lib TestMg
configPath:/usr/local/mapguideopensource/webserverextensions/www/webconfig.ini InitDone userInfo Doneorg.osgeo.mapguide.MgUserInformation@de6ced Site doneorg.osgeo.mapguide.MgSite@1fb8ee3 (3076852624) MgSiteManager::Initialize() Exception
- MgSite.Open line 105 file Services/Site.cpp
- MgSite.Authenticate line 1336 file Services/Site.cpp
- MgServerConnection.Open line 106 file Services/ServerConnection.cpp
(3085924032) MgSiteManager::~MgSiteManager() ]0;root@localhost:~/test_jni[root@localhost test_jni]# exit exit
Script done on Sun 10 Jan 2010 07:44:50 PM IST
Attachments (3)
Change History (10)
by , 15 years ago
Attachment: | console.op.txt.bak added |
---|
by , 15 years ago
Attachment: | hs_err_pid4162.log added |
---|
error log of java vm when it crashed (web component was then in release mode)
comment:1 by , 15 years ago
Keywords: | Java Web Crash added |
---|
We did a full debug build of server and web component. now things work fine. possibly uninitialized read? Again I have the typescript transript of the build sessions. Incidentally there were a few warnings in build concerning uninitialized reads.
thx.
comment:2 by , 15 years ago
From the stack trace, it looks like the problem is in
MgStringCollection* MgSite::Authenticate(MgUserInformation* userInformation, MgSiteInfo* siteInfo, MgStringCollection* requiredRoles, bool returnAssignedRoles, bool skipAuthenticate)
of Common\MapGuideCommon\Services\Site.cpp.
Could you try commenting out the asssert in that method and see if it makes a difference?
Or if you are able to get trace statements to your console, it may be good to try adding some in this method to see where the crash is happening.
comment:3 by , 15 years ago
Tom - thanks. Give me one day - basically we are going beta (and started moving from windows to linux for that) when we noticed the problem. As I mentioned the complete debug build works so focussing on that. I intend to debug this and do step thru/purify like check and will get back to you, but some start up assistance will be mucho useful:
- I am unfamiliar with code structure of Mapguide - is there is any design and code structure doc I can access (at this point I will restrict myself to the Java web interfacing which I guess means Common and Web)
- I am fish out of water on linux - are there make scripts available on svn (or should I just continue with the ones provided with the tar file)
- Any pointers on 'free' purify like tool for linux
- Is the tar the latest source code on 2.0.2 branch (we are stuck at 2.0.2 currently because of studio/maestro compat issues)
Finally we did another test and now I am not even sure about the whole system's install. Basically a JNI test (tutorial sample from sun) also crashed twice in tomcat's context (but not standalone) - have opened a request with Sun to see if they are aware of any issues.
Thx.
comment:4 by , 15 years ago
On the main MGOS trac page (http://trac.osgeo.org/mapguide/) there is a section marked "Developer Information". There are a few links there that may help some (please feel free to update the pages so that they are more helpful for others).
The make scripts that are provided with the tar file are what you need for MGOS. I'm not sure about FDO, but I'm pretty sure that the provided scripts in the tar files should be good enough to work with.
I haven't used many debugging tools on Linux outside of gdb. Anyone else have suggestions?
comment:5 by , 12 years ago
Description: | modified (diff) |
---|---|
Milestone: | → 2.4 |
comment:6 by , 12 years ago
Milestone: | 2.4 → 2.5 |
---|
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Cannot reproduce with 2.5. Possibly due to the many java-related improvements and fixes made since this ticket was filed.
Console o/p showing stack trace and how to compile/run