FastCGI plugin hangs after exit a process

Hi there again.
I�m developing a FastCGI application on a Sun One 6.1 SP 5 over Solaris 2.9.
I success in launching my FCGI Perl application, and it works fine in almost every case. But I have one issue, in which I make an exit in my program (jumping out the accept loop) , in order to restart my application. Here you are the last lines of perl code...
$request->Finish();
logEvent ("LoginCGI v.2.0: Shutting down");
close LOGGER;
$M_ldaph->unbind;
$R_ldaph->unbind;
exit(1);
So far, so wood. I can issue a ps -ef and no process is running on the system.
The problem is that when the following request comes, FCGI plugin is unable to start a new process of my application,returning a HTTP 500.
In this state, I can see in the machine a socket LISTENING on the port that my application does.
10.20.250.49.25757 *.* 0 0 32768 0 LISTEN
Seems that this port is not closed by the web server, and so NO new connections on this port can be engaged.
Do you know what could be the reason of this behaviour ? I think that this problem is not happening over Windows...
Thank you very much in advance.
Best Regards.

I tried running the following simple perl program and it worked fine for exit(0).
use FCGI;
$cnt = 0;
while (FCGI::accept >= 0) {
print "Content-type: text/html\r\n\r\n";
print "<h1>FastCGI Demo Page (perl)</h1>\n";
$cnt++;
print "This is connection number $cnt\n";
if($cnt > 2)
exit(0);
Are you sure there weren't any old application processes running when you tried testing the modified one ?
Would it be possible for you to do the following ?
1. Shutdown Web Server
2. Check if your perl application process and Fastcgistub process have terminated. If not, terminate them manually.
3. Check if the perl application specified in the obj.conf is the one with exit(0) code.
4. Restart the Web Server and send the request.
Let me know if you still observe the hang.
Thanks,
Seema.

Similar Messages

  • Xvnc hangs after exiting Remote Desktop session

    After closing a window of Remote Desktop session with XFCE Desktop run on latest ArchLinux, XRDP server exits, but Xvnc server started by that session keeps running, and within 5-10 min starts suddenly putting high load on CPU, while doing nothing useful.
    Why this happen, and how to auto close it when closing Remote Desktop window & session?

    While the hang reason is still unknown, I found that login out of XFCE from within open XRDP session window before closing the session will shutdown relevant processes on the server host, including Xvnc.

  • Plugin hangs when prompting for network password

    Hi all,
    Here is a summary of what happens :
    The plugin hangs after displaying the dialog box for the
    username / password for the firewall connection.
    No exception is shown.
    The applet is signed.
    This occurs with Plugin 131 and 1.4
    Code sample here :
    URL url = null;
    InputStream is = null;
    URLConnection conn = null;
    //Connect to the URL.
    if (!_httpsFlag) {
    try {
         // Open it up.
         is = new URL(request).openStream();
    _httpsFlag = false;
    catch (Exception e) {
    try {
    url = new URL(reqHttps);
    conn = url.openConnection();
    is = conn.getInputStream();
    _httpsFlag = true;
    catch (Exception e2) {
    e2.printStackTrace();
         showMsg(noWebServerMessage);
    return null;
    else {
    try {
    url = new URL(reqHttps);
    conn = url.openConnection();
    is = conn.getInputStream();
    catch (Exception e) {
    e.printStackTrace();
    showMsg(noWebServerMessage);
    return null;
    If someone has an idea of a solution to this, please help !!

    Just for the record :
    I sorted this one by creating a dummy connection before instanciating the graphical components of the applet.
    The network prompt behaves properly if I do that.

  • Have Photoshop 7.0.1 - recently quit saving as or saving photos after changes. Just hangs until i kill process with task manager. Have uninstalled and reinstalled. Any suggestions? I don't want to upgrade to CC as I hate subscription services and often ha

    Just hangs until i kill process with task manager. Have uninstalled and reinstalled. Any suggestions? I don't want to upgrade to CC as I hate subscription services and often have internet connection services interuppted.

    Which operating system are you using?
    Resetting the photoshop preferences might cure the problem.
    Press and hold down the Shift+Ctrl+Alt keys down just after starting the launch of photoshop 7
    (Shift-Command-Option on a mac)
    Keep holding the keys down until you get a dialog asking if you want to delete the adobe photoshop settings file
    Press Yes

  • Firefox process is left running in memory after exit

    The firefox *32 process is left running in memory after exiting Firefox. You cannot restart firefox without either killing the process (ctrl-alt-del ...) or restarting the computer.
    I am running Windows 7 pro 64bit and Firefox 6.0.2 swedish version.
    I haven't had this kind of a problem with prior versions of Firefox.

    Firefox is already running but is not responding
    * https://support.mozilla.com/en-US/kb/Firefox%20is%20already%20running%20but%20is%20not%20responding
    Profile in use
    * http://kb.mozillazine.org/Profile_in_use
    Check and tell if its working.

  • Mail and Safari hang on exit after recover from disk crash

    Hi,
    I had recently a disk crash on my powerbook. Fortunately the disk gave me enough time to save a disk image of my home folder before it died. Now, I have a new disk in, reinstalled Tiger, updated to 10.4.4. (as I had on the dead disk), copied the home folder from the backup, and fortunately most things work fine.
    I had a system CRASH, while doing the first Spotlight search. I had a second system CRASH, while working in mail. So, I cleared the mail cache. After that, I had no crash anymore and even mail is working fine, until I decide to quit. It then hangs and I have to Force Quit to exit. Similar things happens to Safari.
    I tried several things, e.g. removed the Envelope Index, but it always hangs on exit.
    Any ideas what is going on? I wouldn't like to clear mails totally and reimport and reconfigure the whole thing from scratch.
    Any help is welcome,
    Thomas

    Just in case somebody else runs into such a problem, here is the solution to my puzzle:
    For security reasons (I have a Powerbook and I was worrying about private data in case of a theft...) my mailboxes and any sensitive information is kept on a FileVault disk image of an account I'm usually not using. Instead the FileVault encrypted disk image is mounted in my home folder. To have Mail use the different location I've put symbolic links (ln -s from the terminal).
    Now the problem was, that after my disk crash, some of the directories had been lost, so the links pointed to nowhere. I've got aware on this by looking on the Finder's info on that link. The "More info..." was busy all the time. This means that symbolic links (not aliases!) that point to nowhere are not correctly handled by the Finder and probably by other applications).
    Creating the folders the links pointed to solved the problem!
    Nice to know!
    Thomas

  • Bug-Report: Hyper-V - VM shutdown process hangs after unmount ISO file on host computer

    Hello Microsoft team,
    my HYPER-V VM hangs after I did follow things:
    First I mount an ISO file into my Windows 8.1 Enterprise host (e.g. drive letter X:)
    Now I mount X: into my VM (gen. 1)
    Then I lost connection to X: on my host (e.g. unmount X: on my host computer)
    Now when I shutdown my VM, it will be hangs.
    I reproduced this on three computers with windows 8.1.
    Thanks for help and feedback,
    Gunnar

    Hello Gunnar,
    What do you mean about the sentence ‘mount X: into my VM (gen. 1)’?
    If I mount the Windows 8.1 ISO to drive H:, and then try to install the VM gen 1, it has no issues.
    If I just install the VM gen1 by using the Windows 8.1 ISO that have been mounted to drive H:, I still can’t find the issue.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Firefox hangs after answering yes to Firefox 4 upgrade

    Today when My wife started Firefox from her account she was presented with a window asking if she wanted to update to Firefox 4. She answered yes. At that point Firefox (v3.6.16) became unresponsive with no indication that anything was happening. After some time she tried to shut down Firefox by clicking the X in the upper right corner of the window. She then got the Windows End Program box stating that the program was not responding and allowing her to shut the program down.
    She then restarted Firefox and after what seemed to be a normal start up with the home page being displayed, Firefox would again hang after selecting a bookmarked site.
    When my wife called my attention to this problem, I decided to try it from my Windows XP account to see if the problem only happened in her account. When I first opened Firefox, I briefly saw a progress bar indicating Firefox was being updated. Firefax then opened and loaded two tabs, my home page which is set to the google.com/firefox start page and the same Firefox 4 anouncement page that my wife got when she first started Firefox. When I then selected most bookmarked web sites or even the Firefox Support link on the home page, Firefox would hang and require ending the task to exit. Terminating Firefox in this manner, and restarting Firefox produced the same result. Rebooting the PC after terminating Firefox also produced the same result. Using IE8 to visit the same web sites was successful and resulted in no hangups. In fact, I am currently using IE8 to post this question.
    After restarting and trying many web sites, I did find some sites that opened normally. One was the About Mozilla link on the home page and another was a local weather site: wunderground.com.
    I also ran Firefox in safe mode from the command line and got the same hanging which I understand indicates that the problem is not being caused by any plugins or extensions.
    Any suggestions as to how I can fix this problem would be greatly appreciated.

    Thanks for the suggestions. As it turned out Firefox seemed to fix itself!!! First I must add that I don't believe that my wife clicking on the Firefox 4 update button had anything to do with the hangups. There was no indication that anything had been downloaded. Firefox would start normally but hang when trying to load most web sites. Usually a progress bar would be displayed at the bottom of the page that would never completely load. Clicking on the "Stop loading this page" button would only result in the Firefox symbol at the top left corner turning to a white square and Firefox would become non-responsive requiring an end task to shut down. It acted like an Internet problem but as I reported before, when I tried the same sites in IE they loaded properly. Also rebooting had no immediate effect.
    As I kept trying in my account, more and more web sites started to load properly. After a couple of days, there were no more hang ups occurring at all in my account. The only changes I had made was to disable a couple of extensions: DownloadHelper and Freecorder Community Toolbar in my account. These were never installed in my wife's account and had no immediate effect after disabling them. Unfortunately, Firefox would still hang in my wife's account. She had changed the default browser to IE and when I opened Firefox in her account I got the message box asking if I wanted to change the default to Firefox. At that point clicking on anything resulted in a hang as before. I even tried setting the default browser back to Firefox in Windows "Set Program Access and Defaults" and rebooting but got the same result when I tried running Firefox again.
    Now, after doing nothing to Firefox for a couple of days, Firefox is working correctly in both accounts??? I did notice a lot of hard drive activity during the time I was working this problem. Hmmm.
    I use Norton 360 v4 as my security protection on this machine. They have now released v5 which I am about to upgrade to. I wonder if their LiveUpdate was doing something that affected Firefox?
    I think I will wait awhile before trying to update to Firefox 4.

  • Ff 12 hangs up at starting process (windows xp)

    ff 12 hangs up at starting process - it is nor possible to click on the ui

    A possible cause is security software (firewall,anti-virus) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls
    See also:
    *http://kb.mozillazine.org/Browser_will_not_start_up

  • Flash plugin hangs browser(s)

    Hi,
    Earlier today I created a topic on this on the Mozilla support forums.
    Content repeated below:
    post 1)
    Hi,
    The following issue is driving me nuts;
    Since upgrading to 3.6 sites using Flash hang firefox indefinately.
    The behaviour appears to occur random; some days no problem, some days I get hangs on every flash page.
    The download progress bar just stops in the middle somewhere and Firefox becomes unresponsive and has to be killed through task manager.
    The behaviour is caused by NPSWF32.dll (the Flash 10 dll).
    In about:plugins I can see the following:
    Shockwave Flash
    File: NPSWF32.dll
    Version: 10.0.42.34
    Shockwave Flash 10.0 r42
    application/x-shockwave-flash      Adobe Flash movie      swf
    application/futuresplash      FutureSplash movie      spl
    In Proces Explorer (sysinternals) I can see several NPSWF32.dll threads when FF hangs.
    Usually with 2 separate Start adresses.
    Right now, for instance, FF is hanging (after I started it in safe-mode without add-ons).
    In Process Explorer I see 5 NPSWF32.dll threads:
    3 with start address 0x14cd2 (NPSWF32.dll!nativeShockwaveFlash_TCallLabel+0x14cd2)
    2 with start address 0x637b (NPSWF32.dll!nativeShockwaveFlash_TCallLabel+0x637b)
    All threads have state Wait:UserRequest
    Killing these threads in order of last created will cause Firefox to start responding again.
    In this case killing the 2 0x637b threads caused Firefox to start responding again.
    Unfortunately I usually have to repeat this process for every page which is using Flash.
    Any clues to finding a permanent fix would be much appreciated (and yes, I have tried reinstalling Flash, multiple times).
    Thanks in advance.
    Ralph
    Part of post 2)
    Google Chrome displays the same behaviour (but after some seconds a pop-up offers to close the non-responsive tab).
    Part of post 3)
    On this page:
    http://www.google.com/support/forum/p/C ... 1abd&hl=en
    someone suggested it may be related to sound drivers
    I tried uninstalling / reïnstalling the plugin several times, without errors, but still the plugin hangs on Flash pages.
    Only way to get the browser to respond again is by killing NPSWF32.dll threads.
    Any clues on fixing this would be greatly appreciated.
    Ralph

    Hi, I would like to have you post all of your add ons in IE, both currently loaded and have been loaded and version#'s if listed and the same with the FF plugins, extenstions and add ons.
    You don't want to try to install FP vs 9, it will fail and you may have more problems as a result than you now have.
    McAfee is definitely a problem. We'll address that later. McAfee and Norton are the most intrusive Anti-Virus programs on the market. They can't even be uninstalled by a regular method. They each have their own Uninstallers. Just think "big
    brother". They practically take over your computer and dictate what you can and can't do. So, yes, a major issue.
    However, you have several things going on but I would start with the add ons first and proceed from there. If you want
    me to help you sort this out, you must agree not to "move the goal posts". By that I mean adding, removing, changing,
    installing, uninstalling etc.  I cannot help you if you do that. This is a busy forum and my time is valuable. If you want to experiment that is fine, but I try not to waste my time on that.
    Regards,
    eidnolb

  • Iphoto hangs after upgrading to Yosemite and latest iPhoto version

    It tells me the library needs upgrading, and starts to search the library. The progress bar suggests something is happening then hangs after about 99% completion. I have had to force close twice after several hours stuck at that point and then start the whole process from scratch when I restart.

    Have you followed these instructions - http://www.fatcatsoftware.com/iplm/Help/rebuilding%20a%20corrupted%20iphoto%20li brary.html
    iPhoto Library Manager > Help > Rebuilding a corrupted iPhoto library
    Printable help
    Rebuilding a corrupted iPhoto library
    If you have an iPhoto library that is corrupt and causing iPhoto to crash or otherwise be unusable, iPhoto Library Manager provides the ability to rebuild your library based on the information found in its library data files. Note that iPhoto also has a built-in rebuild function that can be sometimes be used to repair a corrupted library database. You can find instructions on how to use that on Apple's website at http://support.apple.com/kb/HT2638 (iPhoto 6 or later) or http://support.apple.com/kb/HT2042 (iPhoto 5 or earlier).
    iPhoto Library Manager's rebuild works differently, in that instead of trying to repair the library in place, it creates a brand new library and tries to reimport the entire contents of the original library into the new one, including reconstructing albums, photo metadata, etc. Note that rebuilding a library has all the same limitations as other photo transfer operations as far as what can and can't be copied between libraries. Also, depending on how badly damaged the library is, iPhoto Library Manager may or may not be able to piece together some or all of the library metadata.
    To start a rebuild, select the library you would like to rebuild, then choose the "Rebuild Library" item from the "Library" menu. You will be prompted to choose a location for the rebuilt library, and whether or not you want iPLM to scavenge orphaned photos it finds in the library package. Once you've made your choices, iPLM will examine the library and rebuild the library structure and photos as best it can, then display you a preview of what it was able to find. If your library is badly damaged and the preview is missing a lot of content from the original library, this can save you from going through with a rebuild that won’t end up being of much help.
    Once you've had a chance to examine the preview, if you want to go forward and create the rebuilt library, click the "Rebuild" button in the upper right. iPhoto Library Manager will create a new library and start importing the contents of the original library into the new one.
    Scavenging photos
    In some cases, either the iPhoto library database is too damaged for iPhoto Library Manager to be able to salvage any information from it, or the library data is incomplete and there are photos that still exist inside the library package, but iPhoto has lost track of them. In these cases, you may want to check the "Scavenge orphaned photos" checkbox when choosing a location for the rebuilt library. After iPhoto Library Manager has read the library data as best it can, it will perform an additional pass through the package and locate any photos that are no longer referenced in the library database. Any additional photos that are found will be included in the rebuild, and a new "Scavenged Photos" album will be created in the rebuilt library containing any scavenged photos.
    LN

  • Database hangs after retrieving some records....

    hi,
    I create a two level B+-tree index, for the first level i'm using key as logical database name, for the second level B+-tree i'm using some other field in my data. I am retrieving the records based on logical database name. I am using C++ to implement my index.
    In the following code i'm retrieving records from database. Program is behaving differently for different logical database names. For example in my database i have around 4 lakhs records with logical database name 'A' and around 1 lakh of records with logical database name 'B'. The following code displays all B records but programs hangs after retrieving some A records.
    I'm using PAGE_SIZE=8192, numBuffers=2048, and runnig in Fedora Core3.
    DbEnv myEnv(0);
         myEnv.set_cachesize(0, PAGE_SIZE * numBuffers, 0);
         myEnv.set_data_dir("/home/raviov/new/database");
              try {
                   myEnv.open("./", DB_CREATE | DB_INIT_MPOOL, 0);
              catch (DbException &e) {
                   cerr << "Exception occurred: " << e.what() << endl;
                   exit(1);
              db=new Db(&myEnv,0);
              db->set_pagesize(PAGE_SIZE);     
              db->set_bt_compare(compare_int);
         dbname=itoa(p);
         try
         db->open(NULL,
                   "treedb.db",
                   dbname,
                   DB_BTREE,
                   0,
                   0);
         catch(DbException &e)
              cerr << "Failed to open DB object" << endl;
              exit(1);
         db->cursor(NULL,&cursorp,0);
         key=new Dbt();
         data=new Dbt();
         while(ret=(cursorp->get(key,data,DB_NEXT))==0)
              j=*((int*)key->get_data());
              q=(*((struct tuple*)data->get_data())).startPos;
              r=(*((struct tuple*)data->get_data())).endPos;
              s=(*((struct tuple*)data->get_data())).level;
              cout<<"position : "<<j<<"\t";
              cout<<"start : "<<q<<"\t";
              cout<<"end : "<<r<<"\t";
              cout<<"level : "<<s<<"\n";
         if(ret==DB_NOTFOUND)
              cout<<"no records";
              exit(1);
         if(cursorp!=NULL)
              cursorp->close();
         try
              db->close(0);
         catch(DbException &e)
              cerr << "Failed to close DB object" << endl;
              exit(1);
         myEnv.close(0);

    HI Andrei,
    thank you for giving reply, I'm not using any secondary indecies, subdatabases and not using any threads.
    the following code displays index...
    #include <stdio.h>
    #include <db_cxx.h>
    #include <iostream.h>
    #include <db.h>
    #include <stdlib.h>
    #include <string.h>
    #include <sys/types.h>
    int PAGE_SIZE=8192;
    int numBuffers=2048;
    char *itoa(const int x)
          char buf[100];
          snprintf(buf, sizeof(buf), "%d", x);
           return strdup(buf);
    int compare_int(Db dbp, const Dbt a, const Dbt *b)
      int ai;
      int bi;
      memcpy(&ai,a->get_data(),sizeof(int));
      memcpy(&bi,b->get_data(),sizeof(int));
      return(ai-bi);
    struct tuple
           int startPos;
           int endPos;
           int level;
    main()
         FILE *fp;
         int i,j,k,l,m,n,total=0;
         char dbname[500],filename[500],str [500];
         tuple t;
         Db *db;
         Dbt key,data;
         DbEnv myEnv(0);
         myEnv.set_cachesize(0, PAGE_SIZE * numBuffers, 0);
         try {
                myEnv.open("/home/raviov/Desktop/example", DB_CREATE | DB_INIT_MPOOL, 0);
           catch (DbException &e) {
                  cerr << "Exception occurred: " << e.what() << endl;
                  exit(1);
         for(n=0;n<=84;n++)
              db = new Db(&myEnv, 0);     // Instantiate the Db object
                    db->set_bt_compare(compare_int);
               db->set_pagesize(PAGE_SIZE);
              strcpy(filename,"/home/raviov/Desktop/GTCReport/code/sequence/splitter/tree/");
              strcat(filename,itoa(n));
              fp=fopen(filename,"r");
              if(fp==NULL)
                   cout<<"error in opening the file";
                   exit(0);
              while(fgets (str , 500 , fp)!=NULL)
                   sscanf(str,"%d(%d,%d,%d,%d)",&i,&j,&k,&l,&m);
                   key=new Dbt(&i,sizeof(int));
                   if(total==0)
                        strcpy(dbname,itoa(j));
                   t.startPos=k;
                   t.endPos=l;
                   t.level=m;
                   data=new Dbt(&t,sizeof(t));     
                   if(total==0)
                        try
                             db->open(NULL,
                             "tree.db",
                                       dbname,
                              DB_BTREE,
                                DB_CREATE,
                                0);
                        catch(DbException &e)
                               cerr << "Failed to create DB object" << endl;
                             exit(1);
                        total=99;
                   int ret=db->put(NULL,key,data,DB_NOOVERWRITE);
                   if(ret==DB_KEYEXIST)
                        cout<<"key already exist\n";
                        exit(1);
                   delete key;
                   delete data;
              total=0;
              fclose(fp);
              try
                   db->close(0);
              catch(DbException &e)
                     cerr << "Failed to close DB object" << endl;
                   exit(1);
         myEnv.close(0);
    }The following code retrieves the records from database that we had built above...
    #include <stdio.h>
    #include <db_cxx.h>
    #include <iostream.h>
    #include <db.h>
    #include <stdlib.h>
    #include <string.h>
    #include <sys/types.h>
    int PAGE_SIZE=8192;
    int numBuffers=2048;
    char *itoa(const int x)
          char buf[100];
          snprintf(buf, sizeof(buf), "%d", x);
           return strdup(buf);
    int compare_int(Db dbp, const Dbt a, const Dbt *b)
      int ai;
      int bi;
      memcpy(&ai,a->get_data(),sizeof(int));
      memcpy(&bi,b->get_data(),sizeof(int));
      return(ai-bi);
    struct tuple
           int startPos;
           int endPos;
           int level;
    main()
         FILE *fp;
         int i,j,k,l,m,n,total=0;
         char *dbname;
         char filename[200],str [100];
         tuple t;
         Db *db;
         Dbt key,data;
         Dbc *cursorp=NULL;
         int ret,x=4;
         char *ravi;
         int p=84763;
         int y=2134872;
         int r,s,q,count=0;
         DbEnv myEnv(0);
         myEnv.set_cachesize(0, PAGE_SIZE * numBuffers, 0);
         myEnv.set_data_dir("/home/raviov/new/database");
              try {
                      myEnv.open("./", DB_CREATE | DB_INIT_MPOOL, 0);
               catch (DbException &e) {
                      cerr << "Exception occurred: " << e.what() << endl;
                      exit(1);
              db=new Db(&myEnv,0);
              db->set_pagesize(PAGE_SIZE);     
              db->set_bt_compare(compare_int);
         dbname=itoa(p);
         try
              db->open(NULL,
                    "tree.db",
                     dbname,
                     DB_BTREE,
                     0,
                     0);
         catch(DbException &e)
                cerr << "Failed to open DB object" << endl;
              exit(1);
         db->cursor(NULL,&cursorp,0);
         key=new Dbt();
         data=new Dbt();
         while(ret=(cursorp->get(key,data,DB_NEXT))==0)
              j=*((int*)key->get_data());
              q=(*((struct tuple*)data->get_data())).startPos;
              r=(*((struct tuple*)data->get_data())).endPos;
              s=(*((struct tuple*)data->get_data())).level;
              cout<<"position   : "<<j<<"\t";
              cout<<"start : "<<q<<"\t";
              cout<<"end   : "<<r<<"\t";
              cout<<"level   : "<<s<<"\n";
              delete key;
              delete data;
         if(ret==DB_NOTFOUND)
              cout<<"no records";
              exit(1);
         if(cursorp!=NULL)
              cursorp->close();
         try
              db->close(0);
         catch(DbException &e)
                cerr << "Failed to close DB object" << endl;
              exit(1);
         myEnv.close(0);     
    }

  • Lenovo T61 (Product 6458-W2R): explorer.exe hangs after logon - WinXP SP2

    +++ english below +++
    [german/deutsch]
    Wir setzen in unserem Unternehmen mehrere ThinkPad T61 ein.  Bei einigen dieser ThinkPad T61 (und nur beim ThinkPad T61!) haben wir inzwischen ein seltsames Phänomen, welches im Laufe der letzten 1-2 Monate auftrat und noch auftritt.  Dieses Phänomen trat nicht gleichzeitig auf, sondern nacheinander.  Und es tritt willkürlich auf.  Der jüngste Fall ist gerade 1 Tag alt.  Inzwischen sind 6 ThinkPad T61 davon betroffen.
    Alle ThinkPad T61 sind Mitglieder einer Domäne (Windows Server 2003) und durchlaufen ein Loginscript.  Das Loginscript beinhaltet Batchbefehle, Kix32 (für das Mappen von Netzwerklaufwerken und Druckern) und Teile der Matrix42 Empirum Management Software (für Softwaredistribution und Inventarisierung).  Es werden Gruppenrichtlinien angewendet.  Es werden via Matrix42 Empirum automatisch die neuen Patches und Updates seitens Microsoft auf alle Computer verteilt.  Alle Computer erhalten eine unbeaufsichtigte/standardisierte Installation via Matrix42 Empirum Management Software (ähnlich einem Image und der unbeaufsichtigten Windows-Installation).  Auf allen Rechnern ist Windows XP mit Service Pack 2 installiert.  Spezielle Software ist in der Regel nicht drauf, nur Microsoft Office 2003, der aktuelle Acrobat Reader sowie die aktuellen Standardplayer: Windows Media Player, Quicktime Player, RealPlayer, VLC media player.  Ggf. noch Nero 7 Standard bzw. Platinum (Spezielle Version).  Alle IBM/Lenovo ThinkPad verwenden zusätzlich die IBM/Lenovo-Utilities „ThinkVantage“.  Das Phänomen tritt unabhängig davon auf, ob das ThinkPad T61 in einer Dockingstation betrieben wird oder nicht.  Es ist auf jedem Computer in der Windows Registrierung eingestellt, dass der Desktop erst geladen wird, wenn das Loginscript durchgelaufen ist.
    Nun zur genauen Fehlerbeschreibung:
    Manchmal kann es bei einem Kaltstart vorkommen, dass nach der Anmeldung und nach dem Loginscript –während der komplette Desktop und die Startleiste bereits sichtbar sind und noch einige Dienste geladen werden– sich die explorer.exe aufhängt.  Die Startleiste lässt sich nicht bedienen.  Ebenfalls lassen sich dann auch auf dem Desktop keine Symbole doppelklicken.
    Wir setzen auch andere Computer ein, wo dieses Phänomen nicht auftritt, u.a.:
    - HP-Computer (Desktops, Evo SFF Series)
    - Fujitsu-Siemens-Computer (Desktops, ESPRIMO E Series)
    - IBM ThinkPad T20/21
    - IBM ThinkPad T40/T41/T42
    - IBM/Lenovo ThinkPad T60
    Das Problem tritt nur auf den noch relativ neuen ThinkPad T61 auf.
    Wir haben bereits einen ziemlich ähnlichen Fall unter…
    http://forums.techarena.in/showthread.php?t=694888&page=1
    http://forums.techarena.in/showthread.php?t=694888&page=2
    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_22718276.html …gefunden.
    [english]
    Unfortunately, I’m not fluent in the english language.
    We use a few ThinkPad T61’s in our company.  Meanwhile, at some ThinkPad T61’s (only ThinkPad T61!) we have a strange problem. This problem appears since the last 1-2 months and it still does exist.  This problem does not appear at the same time, it does appear successive.  And it appears random.  The last case is 1 day old.  Meanwhile, 6 ThinkPad T61 are concerned.
    All ThinkPad T61 are members of a domain (Windows Server 2003) and do execute a logon script.  The logon script contains Batch commands, Kix32 (for mapping network drives and printers) and parts of the Matrix42 Empirum Management software (for software distribution and inventory scan).  Group policies will apply.  Patches and updates will install on every computer via Matrix42 Empirum automatically.  All computers get a default/unattended installation via Matrix42 Empirum Management software (everywhere between an image and an unattended Windows installation).  All computers have installed Windows XP with Service Pack 2.  As a rule, special software isn’t installed, only Microsoft Office 2003, the actual Acrobat Reader and the actual default players: Windows Media Player, Quicktime Player, RealPlayer, VLC media player.  Sometimes, there is installed the Nero 7 Standard or rather Platinum (Special Edition) yet.  All IBM/Lenovo ThinkPad use IBM/Lenovo-Utilities „ThinkVantage“ additionally.  The problem exists if the ThinkPad T61 is connected to a docking station and also if the ThinkPad T61 is disconnected from a docking station.  On every computer exists a registry key which arranges it that the desktop only will be loaded after the logon script did run.
    Now the detailed error description:
    Sometimes the explorer.exe hangs after the cold start.  i.e.: The desktop (with icons and task bar) appears complete.  But the computer hangs if you try to click on the task bar or double click on any icons.  The computer will only run if we kill the process ‘explorer.exe’ and if we restart the explorer.exe.
    We use also other computers with the same installation and the same group policies where the problem does not exist, for example:
    - HP-Computer (Desktops, Evo SFF Series)
    - Fujitsu-Siemens-Computer (Desktops, ESPRIMO E Series)
    - IBM ThinkPad T20/21
    - IBM ThinkPad T40/T41/T42
    - IBM/Lenovo ThinkPad T60
    Only the new ThinkPad T61’s have this problem.
    We have found a similar case at…
    http://forums.techarena.in/showthread.php?t=694888&page=1
    http://forums.techarena.in/showthread.php?t=694888&page=2
    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_22718276.html
    Vielen Dank / Many thanks!

    I would run System Update and make sure I had all the updates available.
    Another thing to try is:
    1. Right-click on My Computer and click Properties
    2. Click on the Advanced tab
    3. Click on Settings under Performance
    4. Click on Data Execution Prevention
    5. Click on Turn on DEP for all programs and services except those I select, then check Windows Explorer
    We had to do that to some machines here after a push from corporate of the new ScriptLogic.This solved the problem.
    ThinkPad T61 15 Widescreen with nVidia Quadro graphics 6459CTO
    Windows 7 Enterprise and Windows XP Pro

  • AttachCurrentThread hangs after a few calls in a Apache2 PHP5 Extension

    Hello everybody,
    I have created a small C Library/API that calls with JNI a simple Java class with a few methods to work with a underlying Java Framework (Carrot2). That JVM/JNI code functions some kind like a bridge between C and Java. In a single-threaded environment I experienced no problems, the complete runtime flow works well, I get no crashes or other strange behaviour.
    Now I have built an PHP5 extension that makes use of that JNI/C code, the extension is built as a class with constructor/destructor and has a few methods that call functions of my C library. The JNI/C side I have 2 data structs, one is for the JVM and its handle (JavaVM) as well as the Java class name and its path, the jclass object of that class, jvm options, classpath, etc. A second data struct is for the Java environment containing the JNIEnv pointer, the jobject of the Java class and a few more application related variables. The C code consists of JNI functions to work with the Java class to call its methods, a few JNI helper functions and some internal application code and data handling.
    At module initialization (Apache startup) I use the PHP_MINIT and PHP_MSHUTDOWN functions to load and unload (on apache stop) the JVM. The JVM gets created and destroyed at these points.
    I use the PHP constructor (inside the extension) to attach to the JVM, that is AttachCurrentThread with the class constructor, I create and object of the Java class and preload a few Java primitives that I need for my methods later on and after all this I can work with the Java class through JNI. On PHP5 class destruction (also in the extension), I detach from the JVM using 'DetachCurrentThread', free some resources and "delete" the JNIEnv pointer (set it to NULL).
    The JVM data struct (containing the JVM object) is a static global in the PHP5 module since I think there is no need for thread safety. This data is only modified/used in module startup/shutdown. The JNI worker struct (data struct with the JNIEnv pointer and jobject, etc is safely handled by the Zend object store throughout the complete class, so this should be thread-safe. So I do not suspect any problem here.
    Testing the PHP 5 extension with a small PHP5 script using that PHP class and a few methods in Apache debug mode (that is the -X switch for just one worker process) works like a charm, no problems, crashes or misbehaving situations, not up to now with my testing though. But running Apache in regular mode with multiple processes, I run in to problems. One major problem is, after a few reloads of the php script using the extension class (lets say 10-15 reloads; The request is handled by the same apache child process) the `AttachCurrentThread' call hangs and the child process remains in that state. Continuing reloading the script a new child process answers and also here, after 10-15 reloads of the script, I get the same problem. So I am not sure what is really happening here nor I do not know how to solve that issue. Is that a signal problem (I read, that there can be signal mask issues and the JVM hangs when a new thread tries to attach to it, for example, the Jakarta Tomcat JK JNI worker uses a signal hack because of this problem. But that does not help me.
    Or is there some problem with the multi-threading itself (since the JVM is multithreaded too)? Another problem is, besides that hanging thread attach, that the processing sometimes stops in middle of a java call (I have one method that insert data (calling a add method in a for loop) with JNI into a Java list on the Java class side, there it can stop in middle of the insertion process.
    So, for now, I have no idea how to continue. Like said, in a single threaded environment, as a process, the application runs fine without a flaw.
    Some details of my development machines: Ubuntu Lucic 10.04 LTS (also another Ubuntu 8 LTS), Apache2 MPM Worker (multithreaded model) and also on another machine the prefork version, Java JRE 6.0.22, PHP 5.2.16 (compiled from source).
    So any hints that can help me proceeding the development of this module for PHP would be great. Any help is appreciated. If there are questions or some unclear points, please let me know.
    Andreas

    jschell wrote:
    847069 wrote:
    I use the PHP constructor (inside the extension) to attach to the JVM, that is AttachCurrentThread with the class constructor, I create and object of the Java class and preload a few Java primitives that I need for my methods later on and after all this I can work with the Java class through JNI. On PHP5 class destruction (also in the extension), I detach from the JVM using 'DetachCurrentThread', free some resources and "delete" the JNIEnv pointer (set it to NULL).
    That is unclear.
    I presume that you have a PHP class which is making JNI calls.
    Presumably you have a single thread in the caller of the PHP class, specifically a single method, which creates the PHP class, interacts with it, and then destroys it.
    Yes, programming PHP5 extensions in C or C++ let you implement a class or just flat functions that can be used in the PHP scripting language. I implemented a class. So my constructor attaches to the (already at Apache/Module startup created JVM). After that, I can use the methods I have implemented to use the carrot2 framework. To communicate with the Carrot2 library, I have written a simple Java Class containing static functions for adding documents, executing clustering algorithms and receiving the search results, so all pretty straightforward I think. When the PHP script exists (request finished) then the class destructor is called (also implemented in my PHP5 extension) to detach from the JVM and make some cleanup. This is generally how things work.
    Most problems with JNI is caused by pointer problems or misusing the API (like not handling exceptions correctly.)
    Other than that the Sun VM has a command line option that reports useful information when using JNI.I can compile and run my JNI code with some test data from command line and I pass to the JVM some debugging parameters (such as -Xcheck:jni, -verbose:jni and Xint) for testing and debugging. I get no exceptions, errors or warnings. Everything is executed cleanly, I see some JNI/JVM debugging output (such as Dynamic-linking native method messages) along my own debugging output and the program finishes normally. Most JNI calls are wrapped in special macros and I check for exceptions, describe and clear them and act with these situtions (if any), I also added a method to the Java Class where I am able to receive the Java backrace for further investigation and abort execution.
    So for now I am out of ideas. This is why I don't understand these problems within the Apache/PHP process. Like stated above, Apache with one worker "-X" the complete code runs fine, even with consecutive calls all is fine, but then in regular multiprocess mode, I get the above problems like the AttachCurrentThread hangs or the execution of called methods of my Java class (inserting documents to a ArrayList or executing one of the clustering algorithms) hang and I have no other choice but to stop Apache.
    One more thing, I valgrinded my C code as far as possible. It is not possible to valgrind C code that creates and executes a JVM. Valgrind will stop and report "Error occurred during initialization of VM". No wonder though, I do not expect valgrind to execute the JVM beast in its context. The PHP5 version i compiled from source is thread-safe (at least I compiled it with the proper flags for that).
    So any other debugging hints or ideas are welcome.
    Edited by: 847069 on Mar 24, 2011 10:31 PM
    Edited by: 847069 on Mar 24, 2011 10:35 PM

  • Keep weblogic admin server and managed server running after exiting PUTTY

    How do i keep my managed servers and admin servers running on SOLARIS (unix) boxes even after exiting putty and starting them? Do i need to create like a cron job or something?

    *(after running nohup ./startWebLogic.sh i get Sending output to nohup.out and hangs there)*
    out put from nohup.out =>
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=256m
    WLS Start Mode=Production
    CLASSPATH=/usr/Oracle/Middleware/patch_wls1034/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/d/ct0/home/shahs06/JAVA/jdk1.6.0_25/lib/tools.jar:/usr/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/usr/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/usr/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.4.0.jar:/usr/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/usr/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/usr/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/usr/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/usr/Oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar
    PATH=/usr/Oracle/Middleware/wlserver_10.3/server/bin:/usr/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/d/ct0/home/shahs06/JAVA/jdk1.6.0_25/jre/bin:/d/ct0/home/shahs06/JAVA/jdk1.6.0_25/bin:/usr/sbin:/usr/bin:/usr/local/bin:/d/ct0/home/shahs06/JAVA/jdk1.6.0_25/bin
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http://hostname:port/console *
    starting weblogic with Java version:
    java version "1.6.0_25"
    Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
    Starting WLS with line:
    /d/ct0/home/shahs06/JAVA/jdk1.6.0_25/bin/java -server -d64 -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/usr/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -da -Dplatform.home=/usr/Oracle/Middleware/wlserver_10.3 -Dwls.home=/usr/Oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/usr/Oracle/Middleware/wlserver_10.3/server -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/usr/Oracle/Middleware/patch_wls1034/profiles/default/sysext_manifest_classpath:/usr/Oracle/Middleware/patch_ocp360/profiles/default/sysext_manifest_classpath weblogic.Server
    <9-May-2011 1:33:56 o'clock PM PDT> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <9-May-2011 1:33:57 o'clock PM PDT> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <9-May-2011 1:33:59 o'clock PM PDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 20.0-b11 from Sun Microsystems Inc.>
    <9-May-2011 1:34:04 o'clock PM PDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 >
    <9-May-2011 1:34:12 o'clock PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <9-May-2011 1:34:12 o'clock PM PDT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <9-May-2011 1:34:12 o'clock PM PDT> <Notice> <Log Management> <BEA-170019> <The server log file /usr/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.>
    <9-May-2011 1:34:27 o'clock PM PDT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <9-May-2011 1:34:45 o'clock PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <9-May-2011 1:34:45 o'clock PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    9-May-2011 1:34:58 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/console'
    9-May-2011 1:34:58 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/console'
    <9-May-2011 1:35:04 o'clock PM PDT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <9-May-2011 1:35:04 o'clock PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <9-May-2011 1:35:04 o'clock PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <9-May-2011 1:35:06 o'clock PM PDT> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file /usr/Oracle/Middleware/wlserver_10.3/server/lib/DemoIdentity.jks.>
    <9-May-2011 1:35:06 o'clock PM PDT> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /usr/Oracle/Middleware/wlserver_10.3/server/lib/DemoTrust.jks.>
    <9-May-2011 1:35:06 o'clock PM PDT> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /d/ct0/home/shahs06/JAVA/jdk1.6.0_25/jre/lib/security/cacerts.>
    <9-May-2011 1:35:06 o'clock PM PDT> <Alert> <Security> <BEA-090152> <Demo trusted CA certificate is being used in production mode: [
    Version: V3
    Subject: CN=CACERT, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunPKCS11-Solaris RSA public key, 512 bits (id 4371458208, session object)
    modulus: 9550192877869244258838480703390456015046425375252278279190673063544122510925482179963329236052146047356415957587628011282484772458983977898996276815440753
    public exponent: 65537
    Validity: [From: Thu Mar 21 12:12:27 PST 2002,
                   To: Tue Mar 22 13:12:27 PDT 2022]
    Issuer: CN=CACERT, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
    SerialNumber: [    33f10648 fcde0deb 4199921f d64537f4]
    Certificate Extensions: 1
    [1]: ObjectId: 2.5.29.15 Criticality=true
    KeyUsage [
    Key_CertSign
    ]

Maybe you are looking for