Han Ming Ong wrote: > I added a super simple workers2.properties file in the same dir and > tried to start apache. I got a seg fault. Here's the stacktrace from > Mac OS X default crash logger: > > Command: httpd > PID: 853 > > Exception: EXC_BAD_ACCESS (0x0001) > Codes: KERN_INVALID_ADDRESS (0x0001) at 0x736f0028 > > Thread 0 Crashed: > #0 0x90001600 in strlen > #1 0x900023e0 in vfprintf > #2 0x90015ee0 in __sbprintf > #3 0x900018a8 in vfprintf > #4 0x900017ec in fprintf > #5 0x0060fdbc in jk2_map_default_get (jk_map.c:97) <-- it's '97' > because I added printf
Are you using the commented-out printf ? It is possible that one of name or value is null - printf is not checking for null on many OS. Try using apr printf, or check for null. > Here's output with some printf statements inserted in jk_map.c: > entering for threadMutex (no. maps: 25) > 0: logger.file (°Z°Z°Z°Z°Z°Z) <- funny output is from > fprintf(stderr,"%s", mPriv->values[i]) Can you add printf to map_put also ? The value in this case is the jk_env structure ( or jk_log ?), it's normal to be 'funny'. I would print it as %p, it's a struct *. ( at least for the object map ) > entering for ver (no. maps: 1) > 0: worker (ajp13:localhost:8009) > done for ver > [here it churns for a few seconds before segfaulting] > bin/apachectl: line 87: 853 Segmentation fault $HTTPD -k $ARGV > > Anyone has a clue on what could be wrong? Just pointers would help. I > tried following the stack trace but am temporarily thrown off by how > jk2_env_createBean2() gets to jk2_map_default_get(), especially the > second parameter's type. It seems to be casted from (char *) to > (jk_map_t *), which is kind of weird. Not sure what you mean. The second parameter of env->getBean2( ) is string. jk2_env_getBean2 will call jk2_map_default_get ( actually, env->_objects->get ) with env->_objects as second param, which is a jk_map. Please check first the printf() params for null. Costin > > Appreciate it. > > Han Ming > > > #------------------------ workers2.properties > -------------------------------- > > # Shared memory handling. Needs to be set. > [shm] > file=/usr/local/apache2/logs/shm.file > size=1048576 > > # Example socket channel, explicitly set port and host. > [channel.socket:localhost:8009] > port=8009 > host=127.0.0.1 > #keepalive=1 > > # define the worker > [ajp13:localhost:8009] > # channel=channel.un:/usr/local/tomcat/work/jk2.socket > # To use the TCP/IP socket instead, just comment out the above > # line, and uncomment the one below > channel=channel.socket:localhost:8009 > > # Announce a "status" worker > [status:status] > > # Uri mapping > [uri:/examples/*] > worker=ajp13:localhost:8009 > #worker=ajp13:/usr/local/tomcat/work/jk2.socket > > [uri:/jkstatus/*] > worker=status:status > > #---- end of workers2.properties -- Costin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>