Hello
After rotate logs and graceful I constantly gets segfaults:
[Tue Feb 01 00:00:04 2011] [notice] Digest: generating secret for digest
authentication ...
[Tue Feb 01 00:00:04 2011] [notice] Digest: done
[Tue Feb 01 00:00:04 2011] [notice] Apache/2.2.17 (FreeBSD) DAV/2
PHP/5.3.5 with Suhosin-Patch configured -- resuming normal operations
[Tue Feb 01 00:00:04 2011] [notice] child pid 49233 exit signal
Segmentation fault (11), possible coredump in /tmp
[Tue Feb 01 00:00:04 2011] [notice] child pid 23190 exit signal
Segmentation fault (11), possible coredump in /tmp
[Tue Feb 01 00:00:04 2011] [notice] child pid 23187 exit signal
Segmentation fault (11), possible coredump in /tmp
This is backtrace:
(gdb) bt full
#0 apr_allocator_destroy (allocator=0x80f41a980) at
memory/unix/apr_pools.c:133
node = (apr_memnode_t *) 0x80000006d
#1 0x000000000044c353 in child_main (child_num_arg=Variable
"child_num_arg" is not available.
) at peruser.c:578
ptrans = (apr_pool_t *) 0x80f513028
allocator = (apr_allocator_t *) 0x80f41a980
status = 0
i = Variable "i" is not available.
(gdb) bt
#0 apr_allocator_destroy (allocator=0x80f41a980) at
memory/unix/apr_pools.c:133
#1 0x000000000044c353 in child_main (child_num_arg=Variable
"child_num_arg" is not available.
) at peruser.c:578
#2 0x000000000044c6b4 in make_child (s=0x80181a868, slot=7) at
peruser.c:2563
#3 0x000000000044cd76 in ap_mpm_run (_pconf=Variable "_pconf" is not
available.
) at peruser.c:2681
#4 0x000000000042440a in main (argc=1, argv=0x7fffffffeba0) at main.c:739
(gdb) frame 0
#0 apr_allocator_destroy (allocator=0x80f41a980) at
memory/unix/apr_pools.c:133
133 *ref = node->next;
(gdb) list
128 apr_memnode_t *node, **ref;
129
130 for (index = 0; index < MAX_INDEX; index++) {
131 ref = &allocator->free[index];
132 while ((node = *ref) != NULL) {
133 *ref = node->next;
134 free(node);
135 }
136 }
137
(gdb) list -
118 new_allocator->max_free_index =
APR_ALLOCATOR_MAX_FREE_UNLIMITED;
119
120 *allocator = new_allocator;
121
122 return APR_SUCCESS;
123 }
124
125 APR_DECLARE(void) apr_allocator_destroy(apr_allocator_t *allocator)
126 {
127 apr_uint32_t index;
(gdb) list -
108 APR_DECLARE(apr_status_t) apr_allocator_create(apr_allocator_t
**allocator)
109 {
110 apr_allocator_t *new_allocator;
111
112 *allocator = NULL;
113
114 if ((new_allocator = malloc(SIZEOF_ALLOCATOR_T)) == NULL)
115 return APR_ENOMEM;
116
117 memset(new_allocator, 0, SIZEOF_ALLOCATOR_T);
(gdb) frame 1
#1 0x000000000044c353 in child_main (child_num_arg=Variable
"child_num_arg" is not available.
) at peruser.c:578
warning: Source file is more recent than executable.
578 apr_pool_destroy(pchild);
(gdb) list
573 _DBG("close(CHILD_INFO_TABLE[%d].senv->output) = %d",
574 my_child_num, retval);
575 }
576
577 if (pchild) {
578 apr_pool_destroy(pchild);
579 }
580 ap_mpm_pod_close(pod);
581 chdir_for_gprof();
582 exit(code);
(gdb) frame 2
#2 0x000000000044c6b4 in make_child (s=0x80181a868, slot=7) at
peruser.c:2563
2563 child_main(slot);
(gdb) list
2558 apr_signal(SIGTERM, just_die);
2559 /* The child process doesn't do anything for
AP_SIG_GRACEFUL.
2560 * Instead, the pod is used for signalling graceful restart.
2561 */
2562 /* apr_signal(AP_SIG_GRACEFUL, restart); */
2563 child_main(slot);
2564 clean_child_exit(0);
2565 }
2566
2567 ap_scoreboard_image->parent[slot].pid = pid;
(gdb) dump_request r
No symbol "r" in current context.
(gdb) frame 3
#3 0x000000000044cd76 in ap_mpm_run (_pconf=Variable "_pconf" is not
available.
) at peruser.c:2681
2681 make_child(ap_server_conf, i);
(gdb) list
2676 _DBG("Exiting... restart_pending = %d",
restart_pending);
2677 break;
2678 }
2679 if (CHILD_INFO_TABLE[i].status == CHILD_STATUS_STARTING
2680 && CHILD_INFO_TABLE[i].pid == 0)
2681 make_child(ap_server_conf, i);
2682 }
2683 }
2684
2685 static void inline check_for_new_childs()
(gdb) frame 4
#4 0x000000000042440a in main (argc=1, argv=0x7fffffffeba0) at main.c:739
739 if (ap_mpm_run(pconf, plog, server_conf))
(gdb) list
734 apr_pool_destroy(ptemp);
735 apr_pool_lock(pconf, 1);
736
737 ap_run_optional_fn_retrieve();
738
739 if (ap_mpm_run(pconf, plog, server_conf))
740 break;
741
742 apr_pool_lock(pconf, 0);
743 }
(gdb) dump_request r
No symbol "r" in current context.
Best regards
Michal Kumzak
Dne 19.1.2011 22:47, Marcelo Coelho napsal(a):
Hello!
Peruser patch (v15) - FreeBSD
Patch from RC2:
http://opensource.mco2.net/download/apache/peruser/peruser-rc2-to-rc3-v15-freebsd.patch
Full patch from vanilla Apache 2.2.17:
http://opensource.mco2.net/download/apache/peruser/peruser-rc3-full-v15-freebsd.patch
Important: this patch works only with FreeBSD because cpu_usage.c uses FreeBSD
KVM Library to control CPU use. This patch will not work on Linux (I guess).
There is a new parameter MaxCPUUsage, to control CPU use by each processor. It
works like Linux cpulimit utility: if processor CPU use is greater than
MaxCPUUsage, sends a SIGSTOP, if lower, sends a SIGCONT.
MaxCPUUsage defaults 0, wich means unlimited.
Changes (from RC2):
* (v15) Feature: /server-status with more details (CPU usage of each processor
and each ServerEnvironment).
* (v15) Feature: New configuration MaxCPUUsage
* (v15) Bug fix: some segfaults fixed.
* (v14) Bug fix: multiplexer segfault when passing big requests to processors
(URI with ~8192 bytes and big Referer header)
* (v14) Performance: faster idle server maintenance
* (v14) Clean-up: removed .orig files
* (v13) Code more "APR-ized"
* (v13) Bug fix: apachectl graceful works, even under high load.
* (v12) Not released to public
* (v11) Not released to public
* (v10) Bug fixed: fixed some segfaults
* (v10) Bug fixed: work around to a flaw in apr-util (as PR 43857)
* (v9) Not released to public
* (v8) Bug fixed: apachectl graceful now is more stable, like RC2 version
* (v8) Bug fixed: fixed some segfaults (thank you Dave Steinberg for sending
your core dumps)
* (v8) Bug fixed: server dies with infinite loop script, reported by Taavi
Sannik
* (v8) Bug fixed: "long lost child" error, reported by Taavi Sannik
* (v8) Performance: update_all_counters() rewritten without malloc() and free()
* (v7) Bug fixed: multiplexers now can clone a processor child if all workers
are busy.
* (v6) Bug fixed: apachectl graceful now working properly, without "long lost
child" errors
* (v5) Not released to public
* (v4) Code cleanup
* (v4) Performance: childs are started in ~25ms, 40 times faster than in RC2
(~1000ms)
* (v4) Bug fixed: now checking if total_processors is 1 (first access) to start
StartProcessors
* (v3) Performance: new child type (CHILD_TYPE_RESERVED) to avoid collision (2
childs trying to get the same free slot)
* (v3) Bug fixed: fixed a bug in RC2, wait_timeout was always 0, never sleeping
to wait for new workers.
* (v2) Performance: StartProcessors, new configuration directive to control the
number of child processors per vhost at startup
* (v2) Performance: childs are started in ~50ms, 20 times faster than in RC2
(~1000ms)
* (v1) Performance: faster to lookup for free slots (this is important on busy
servers, with many virtual hosts)
* (v1) Performance: faster to count processors, one single loop counts all
processors
* (v1) Bug fixed: bug when MinSpareProcessors is set to 0 (now all workers
processes are killed when idle_timeout is reached)
* (v1) Bug fixed: Free-up slots when a WORKER or PROCESSOR unexpectedly dies
Regards,
--
Marcelo Coelho
marcelo at mco2.com.br
_______________________________________________
Peruser mailing list
[email protected]
http://www.telana.com/mailman/listinfo/peruser
_______________________________________________
Peruser mailing list
[email protected]
http://www.telana.com/mailman/listinfo/peruser