Skip to content

Instantly share code, notes, and snippets.

View jbq's full-sized avatar

Jean-Baptiste Quenot jbq

View GitHub Profile
@jbq
jbq / gist:976214
Created May 17, 2011 09:48
Varnish crash
May 17 10:55:21 gw1 varnish-reload: Failed to reload /etc/varnish/default.vcl
May 17 08:55:21 gw1 varnishd[22330]: Child (2478) Panic message: Assert error in WSLR(), shmlog.c line 236:
Condition(w->wlp < w->wle) not true.
thread = (cache-worker)
ident = Linux,2.6.35-28-server,x86_64,-sfile,-hcritbit,epoll
Backtrace:
0x4235f8: /usr/sbin/varnishd() [0x4235f8]
0x4385ed: /usr/sbin/varnishd(WSLR+0x1cd) [0x4385ed]
0x4203cd: /usr/sbin/varnishd() [0x4203cd]
0x4205ce: /usr/sbin/varnishd(http_DissectRequest+0xee) [0x4205ce]
@jbq
jbq / varnish_crash.txt
Created July 16, 2011 19:54
Varnish crash
Core was generated by `/usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -t 604800 -T localhost:6082'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000431098 in vsl_hdr (w=0x7efa9f0feb70, tag=SLT_LostHeader, id=50, fmt=<value optimized out>) at cache_shmlog.c:62
62 cache_shmlog.c: No such file or directory.
in cache_shmlog.c
(gdb) bt
#0 0x0000000000431098 in vsl_hdr (w=0x7efa9f0feb70, tag=SLT_LostHeader, id=50, fmt=<value optimized out>) at cache_shmlog.c:62
#1 WSL (w=0x7efa9f0feb70, tag=SLT_LostHeader, id=50, fmt=<value optimized out>) at cache_shmlog.c:259
#2 0x000000000042713c in http_dissect_hdrs (w=0x7efa9f0feb70, fd=50, hp=0x7efa9fbbd3e0, htc=0x7efa9fbbd0e8, h1=0, h2=1, h3=2) at cache_http.c:549
#3 http_splitline (w=0x7efa9f0feb70, fd=50, hp=0x7efa9fbbd3e0, htc=0x7efa9fbbd0e8, h1=0, h2=1, h3=2) at cache_http.c:633
@jbq
jbq / gist:1118512
Created August 1, 2011 16:54
PG queries waiting for locks
select current_query, mode, relname from pg_stat_activity inner join pg_locks on procpid = pid inner join pg_class on oid=relation where waiting = true;
@jbq
jbq / plpython_crash.txt
Created August 11, 2011 15:56
plpython crash with -O0
Program terminated with signal 11, Segmentation fault.
#0 0x00007fdddd6fb727 in heap_compute_data_size (tupleDesc=0x7fdddd5b6268, values=0x7fddde7a3770, isnull=0x7fddde7a37c0 "") at heaptuple.c:104
104 VARATT_CAN_MAKE_SHORT(DatumGetPointer(val)))
(gdb) bt
#0 0x00007fdddd6fb727 in heap_compute_data_size (tupleDesc=0x7fdddd5b6268, values=0x7fddde7a3770, isnull=0x7fddde7a37c0 "") at heaptuple.c:104
#1 0x00007fdddd6fcc4a in heap_form_tuple (tupleDescriptor=0x7fdddd5b6268, values=0x7fddde7a3770, isnull=0x7fddde7a37c0 "") at heaptuple.c:688
#2 0x00007fddb7a77328 in PLyMapping_ToTuple (info=0x7fddde79e810, desc=0x7fdddd5b6268, mapping=0x7fddde7aa0b0) at plpython.c:2658
#3 0x00007fddb7a76711 in PLyObject_ToTuple (info=0x7fddde79e810, desc=0x7fdddd5b6268, plrv=0x7fddde7aa0b0) at plpython.c:2381
#4 0x00007fddb7a730aa in PLy_function_handler (fcinfo=0x7fff79863ef0, proc=0x7fddde79e7f0) at plpython.c:1224
#5 0x00007fddb7a70eda in plpython_call_handler (fcinfo=0x7fff79863ef0) at plpython
@jbq
jbq / crashtest.sql
Created August 16, 2011 16:43
Test case for PLyMapping_ToTuple issue
CREATE OR REPLACE PROCEDURAL LANGUAGE plpythonu;
CREATE TABLE foo (
id integer not null primary key,
value integer not null
);
CREATE FUNCTION get_foo() RETURNS SETOF foo
LANGUAGE plpythonu
AS $$
r = plpy.execute("select * from foo limit 1 FOR UPDATE")
if len(r) == 0:
@jbq
jbq / gist:1149543
Created August 16, 2011 17:00
Crash test on PG 9.0.4
CREATE LANGUAGE
psql:crashtest.sql:5: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
CREATE TABLE
CREATE FUNCTION
id | value
----+-------
1 | 2
(1 row)
ALTER TABLE
@jbq
jbq / gist:1149558
Created August 16, 2011 17:04
Crash test on PG 9.0.4 with plpython.c backported from HEAD
CREATE LANGUAGE
psql:crashtest.sql:5: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
CREATE TABLE
CREATE FUNCTION
id | value
----+-------
1 | 2
(1 row)
ALTER TABLE
@jbq
jbq / gist:1182132
Created August 30, 2011 21:36
Varnish 3.0.1 rc1 crash
warning: Can't read pathname for load map: Input/output error.
warning: Could not load shared library symbols for ./vcl.3pELQhya.so.
Do you need "set solib-search-path" or "set sysroot"?
Reading symbols from /usr/lib/varnish/libvarnish.so...Reading symbols from /usr/lib/debug/usr/lib/varnish/libvarnish.so...done.
done.
Loaded symbols for /usr/lib/varnish/libvarnish.so
Reading symbols from /usr/lib/varnish/libvarnishcompat.so...Reading symbols from /usr/lib/debug/usr/lib/varnish/libvarnishcompat.so...done.
done.
Loaded symbols for /usr/lib/varnish/libvarnishcompat.so
@jbq
jbq / gist:1188467
Created September 2, 2011 12:12
Varnish 3.0.1 rc1 HttpGarbage crash
Sep 2 08:14:09 gw1 varnishd[7268]: Child (829) Panic message: Assert error in WSLR(), cache_shmlog.c line 220:
Condition(VSL_END(w->wlp, l) < w->wle) not true.
thread = (cache-worker)
ident = Linux,2.6.38-8-generic,x86_64,-sfile,-smalloc,-hcritbit,epoll
Backtrace:
0x435d9f: /usr/sbin/varnishd() [0x435d9f]
0x436074: /usr/sbin/varnishd() [0x436074]
0x43c61a: /usr/sbin/varnishd(WSLR+0x161) [0x43c61a]
0x430e26: /usr/sbin/varnishd(http_DissectRequest+0x1e6) [0x430e26]
0x41b65a: /usr/sbin/varnishd() [0x41b65a]
@jbq
jbq / gist:1188943
Created September 2, 2011 15:37
varnishncsa 3.0.1 rc1 crash
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/varnish/libvarnishcompat.so...Reading symbols from /usr/lib/debug/usr/lib/varnish/libvarnishcompat.so...done.
done.
Loaded symbols for /usr/lib/varnish/libvarnishcompat.so
Reading symbols from /usr/lib/libvarnishapi.so.1...Reading symbols from /usr/lib/debug/usr/lib/libvarnishapi.so.1.0.0...done.
done.
Loaded symbols for /usr/lib/libvarnishapi.so.1
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...(no debugging symbols found)...done.