[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Weird problem. The DB repeatedly waits for 1 second.

From: Nicolás Lichtmaier <jnl_at_synapsis-sa.com.ar>
Date: 2004-02-23 22:39:28 CET

I'm having a very weird problem. The db is veeery slow. I cannot finish
a checkout operation successfuly. I've ran strace to the apache process
and I saw lots of:

select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
pread(16, "\274\1\0\0U\215\f\0\271\3\0\0\254\3\0\0b\2\0\0\214\0(\3"...,
4096, 3903488) = 4096
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
pread(16, "\\\1\0\0\f\267\v\0%\3\0\0\26\3\0\0004\3\0\0P\0\204\10\1"...,
4096, 3297280) = 4096
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
pread(16, "]\1\0\0\235\277\2\0-\3\0\0\36\3\0\0008\3\0\0J\0\200\10"...,
4096, 3330048) = 4096

I've used gdb and I've found out that the problem is inside Berkeley DB.
When trying to get some data from the DB, it calls __memp_alloc to get
some cache space (according what I've read). This functions calls
os_sleep(1) several times. There are comments in Berkeley DB source code
explaining that such condition is seen when there's no memory, but I
have plenty of memory here (2 Gb of RAM).

I'm attaching the a full stack trace.

Thanks for any advice you can give me.

-- 
Nicolás Lichtmaier.-
Synapsis Argentina
+54(11)4314-3000 (int. 231)

#0 0xb75ebc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0xb71ceead in ___newselect_nocancel () from /lib/tls/libc.so.6
#2 0xb7393bd8 in __os_sleep () from /lib/libdb-4.1.so
#3 0xb738af00 in __memp_alloc () from /lib/libdb-4.1.so
#4 0xb738c69c in __memp_fget () from /lib/libdb-4.1.so
#5 0xb732d25e in __bam_search () from /lib/libdb-4.1.so
#6 0xb73232de in __bam_c_rget () from /lib/libdb-4.1.so
#7 0xb732073b in __bam_c_dup () from /lib/libdb-4.1.so
#8 0xb7342489 in __db_c_get () from /lib/libdb-4.1.so
#9 0xb733c37f in __db_get () from /lib/libdb-4.1.so
#10 0xb709fa08 in svn_fs__bdb_get_node_revision (noderev_p=0xbfffd500,
    fs=0x81b6738, id=0x8536c48, trail=0x84c0398)
    at subversion/libsvn_fs/bdb/nodes-table.c:201
#11 0xb70a245f in get_node_revision (noderev_p=0xbfffd52c, node=0x8536c30,
    trail=0x84c0398) at subversion/libsvn_fs/dag.c:204
#12 0xb70a25d9 in svn_fs__dag_get_node (node=0xbfffd598, fs=0x81b6738,
    id=0x85369f0, trail=0x84c0398) at subversion/libsvn_fs/dag.c:255
#13 0xb70a4a8b in svn_fs__dag_open (child_p=0xbfffd598, parent=0x8536198,
    name=0x8536368 "ServidorManiobras", trail=0x84c0398)
    at subversion/libsvn_fs/dag.c:1404
#14 0xb70acef2 in open_path (parent_path_p=0xbfffd600, root=0x847a938,
    path=0x8533670 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas/simNotas.mak", flags=0, txn_id=0x0, trail=0x84c0398)
    at subversion/libsvn_fs/tree.c:893
#15 0xb70ad3c2 in get_dag (dag_node_p=0xbfffd62c, root=0x847a938,
    path=0x8533670 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas/simNotas.mak", trail=0x84c0398)
    at subversion/libsvn_fs/tree.c:1067
#16 0xb70ad489 in txn_body_node_id (baton=0xbfffd6c0, trail=0x84c0398)
    at subversion/libsvn_fs/tree.c:1123
#17 0xb70abeb6 in do_retry (fs=0x81b6738,
    txn_body=0xb70ad458 <txn_body_node_id>, baton=0xbfffd6c0, use_txn=1,
    pool=0x84bfda0, txn_body_fn_name=0xb70b82ad "unknown",
    filename=0xb70b82ac "", line=0) at subversion/libsvn_fs/trail.c:227
#18 0xb70abfea in svn_fs__retry_txn (fs=0x81b6738,
    txn_body=0xb70ad458 <txn_body_node_id>, baton=0xbfffd6c0, pool=0x84bfda0)
    at subversion/libsvn_fs/trail.c:286
#19 0xb70ad55e in svn_fs_node_id (id_p=0xbfffd70c, root=0x847a938,
    path=0x84c0028 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas/simNotas.mak", pool=0x84bfda0) at subversion/libsvn_fs/tree.c:1154
#20 0xb70dcac2 in dav_svn_get_safe_cr (root=0x81e1888,
    path=0x84c0028 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas/simNotas.mak", pool=0x84bfda0)
    at /home/oracle/apache2/subversion-svn/subversion/mod_dav_svn/util.c:121
#21 0xb70da66c in send_vsn_url (baton=0x84bff80, pool=0x84bfda0)
    at /home/oracle/apache2/subversion-svn/subversion/mod_dav_svn/update.c:378
#22 0xb70daade in add_helper (is_dir=0,
    path=0x84bfe30 "FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas/simNotas.mak", parent=0x83dfc40, copyfrom_path=0x0, copyfrom_revision=-1,
    pool=0x84bfda0, child_baton=0xbfffd830)
    at /home/oracle/apache2/subversion-svn/subversion/mod_dav_svn/update.c:518
#23 0xb70db62e in upd_add_file (
    path=0x84bfe30 "FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas/simNotas.mak", parent_baton=0x83dfc40, copyfrom_path=0x0,
    copyfrom_revision=-1, pool=0x84bfda0, file_baton=0xbfffd830)
    at /home/oracle/apache2/subversion-svn/subversion/mod_dav_svn/update.c:854
#24 0xb70bfbfe in add_file_or_dir (c=0xbfffdc10, dir_baton=0x83dfc40,
    target_path=0x84bfdd8 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas/simNotas.mak",
    edit_path=0x84bfe30 "FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas/simNotas.mak", tgt_kind=svn_node_file, pool=0x84bfda0)
    at subversion/libsvn_repos/delta.c:814
#25 0xb70c029e in delta_dirs (c=0xbfffdc10, dir_baton=0x83dfc40,
    source_path=0x0,
    target_path=0x83dfab8 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas",
    edit_path=0x83dfb08 "FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas", pool=0x83dfa80) at subversion/libsvn_repos/delta.c:1014
#26 0xb70bfb95 in add_file_or_dir (c=0xbfffdc10, dir_baton=0x8386290,
    target_path=0x83dfab8 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas",
    edit_path=0x83dfb08 "FuncionesBasicas/ServidorManiobras/ServidorManiobras/Pruebas", tgt_kind=svn_node_dir, pool=0x83dfa80)
    at subversion/libsvn_repos/delta.c:805
#27 0xb70c029e in delta_dirs (c=0xbfffdc10, dir_baton=0x8386290,
    source_path=0x0,
    target_path=0x8386120 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras",
    edit_path=0x8386168 "FuncionesBasicas/ServidorManiobras/ServidorManiobras", pool=0x83860e8) at subversion/libsvn_repos/delta.c:1014
#28 0xb70bfb95 in add_file_or_dir (c=0xbfffdc10, dir_baton=0x83163f0,
    target_path=0x8386120 "/sac/tronco/FuncionesBasicas/ServidorManiobras/ServidorManiobras",
    edit_path=0x8386168 "FuncionesBasicas/ServidorManiobras/ServidorManiobras", tgt_kind=svn_node_dir, pool=0x83860e8) at subversion/libsvn_repos/delta.c:805
#29 0xb70c029e in delta_dirs (c=0xbfffdc10, dir_baton=0x83163f0,
    source_path=0x0,
    target_path=0x8316300 "/sac/tronco/FuncionesBasicas/ServidorManiobras",
    edit_path=0x8316330 "FuncionesBasicas/ServidorManiobras", pool=0x83162c8)
    at subversion/libsvn_repos/delta.c:1014
#30 0xb70bfb95 in add_file_or_dir (c=0xbfffdc10, dir_baton=0x82beef0,
    target_path=0x8316300 "/sac/tronco/FuncionesBasicas/ServidorManiobras",
    edit_path=0x8316330 "FuncionesBasicas/ServidorManiobras",
    tgt_kind=svn_node_dir, pool=0x83162c8)
    at subversion/libsvn_repos/delta.c:805
#31 0xb70c029e in delta_dirs (c=0xbfffdc10, dir_baton=0x82beef0,
    source_path=0x0, target_path=0x82bee50 "/sac/tronco/FuncionesBasicas",
    edit_path=0x82bee70 "FuncionesBasicas", pool=0x82bee18)
    at subversion/libsvn_repos/delta.c:1014
#32 0xb70bfb95 in add_file_or_dir (c=0xbfffdc10, dir_baton=0x81b2cf8,
    target_path=0x82bee50 "/sac/tronco/FuncionesBasicas",
    edit_path=0x82bee70 "FuncionesBasicas", tgt_kind=svn_node_dir,
    pool=0x82bee18) at subversion/libsvn_repos/delta.c:805
#33 0xb70c029e in delta_dirs (c=0xbfffdc10, dir_baton=0x81b2cf8,
    source_path=0x81b2bf8 "/sac/tronco", target_path=0x81b2be8 "/sac/tronco",
    edit_path=0xb70c8a0b "", pool=0x81b46f8)
    at subversion/libsvn_repos/delta.c:1014
#34 0xb70bef83 in svn_repos_dir_delta (src_root=0x81f1cd8,
    src_parent_dir=0x81b2b28 "/sac/tronco", src_entry=0x81b2b38 "",
    tgt_root=0x8240de0, tgt_fullpath=0x81b2be8 "/sac/tronco",
    editor=0x81b2a58, edit_baton=0xbfffdd80,
    authz_read_func=0xb70d9f08 <authz_read>, authz_read_baton=0xbfffdd48,
    text_deltas=1, recurse=1, entry_props=1, ignore_ancestry=0, pool=0x81b46f8)
    at subversion/libsvn_repos/delta.c:356
#35 0xb70c68bf in finish_report (report_baton=0x81b2ad0, pool=0x81b46f8)
    at subversion/libsvn_repos/reporter.c:471
#36 0xb70c6901 in svn_repos_finish_report (report_baton=0x81b2ad0,
    pool=0x81b46f8) at subversion/libsvn_repos/reporter.c:495
#37 0xb70dc569 in dav_svn__update_report (resource=0x81b28f0, doc=0x81b6608,
    output=0x81b65b8)
    at /home/oracle/apache2/subversion-svn/subversion/mod_dav_svn/update.c:1346
#38 0xb70de413 in dav_svn_deliver_report (r=0x81b4730, resource=0x81b28f0,
    doc=0x81b6608, output=0x81b65b8)
    at /home/oracle/apache2/subversion-svn/subversion/mod_dav_svn/version.c:899
#39 0x08092421 in dav_method_report (r=0x81b4730) at mod_dav.c:4045
#40 0x080b030e in ap_run_handler (r=0x81b4730) at config.c:194
#41 0x080b0829 in ap_invoke_handler (r=0x81b4730) at config.c:401
#42 0x0808c0d7 in ap_process_request (r=0x81b4730) at http_request.c:288
#43 0x080881f8 in ap_process_http_connection (c=0x819bf90) at http_core.c:293
#44 0x080b936a in ap_run_process_connection (c=0x819bf90) at connection.c:85
#45 0x080aefc1 in child_main (child_num_arg=1) at prefork.c:694
#46 0x080af108 in make_child (s=0x8101990, slot=1) at prefork.c:788
#47 0x080af2be in perform_idle_server_maintenance (p=0x80ff5d0)
    at prefork.c:923
#48 0x080af646 in ap_mpm_run (_pconf=0x80ff5d0, plog=0x813f6d0, s=0x8101990)
    at prefork.c:1118
#49 0x080b485b in main (argc=3, argv=0xbfffe174) at main.c:660

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 23 22:46:32 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.