Uploaded image for project: 'FreeSWITCH'
  1. FreeSWITCH
  2. FS-3693

DB-Processes locked "idle in transaction" due to updates in sip_dialog-Table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: mod_sofia
    • Labels:
      None
    • Environment:
      Debian 6.0 2.6.32-5-openvz-amd64
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • uname:
      Linux clbr-dev-fs01 2.6.32-5-openvz-amd64 #1 SMP Wed May 18 23:53:57 UTC 2011 x86_64 GNU/Linux
    • Userland:
      GNU/Linux
    • lsb_release:
      Hide
      No LSB modules are available.
      Distributor ID: Debian
      Description: Debian GNU/Linux 6.0.3 (squeeze)
      Release: 6.0.3
      Codename: squeeze
      Show
      No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 6.0.3 (squeeze) Release: 6.0.3 Codename: squeeze
    • Compiler:
      gcc
    • Compiler Version:
      gcc version 4.4.5 (Debian 4.4.5-8)
    • FreeSWITCH GIT Revision:
      FreeSWITCH Version 1.0.head (git-d93ed90 2011-11-11 20-17-21 -0600)
    • GIT Master Revision hash::
      yes

      Description

      I'm experiencing system lockups due to DB-process which hang "idle in transaction". I've tracked the issue down to pg_locks in place.

      I'm using postgresql with unixODBC(2.2.14p2-1).

      This is how the hanging processes look with ps:
      root@clbr-dev-fs01:~# ps ax|grep postgres|grep free
      14456 pts/1 S+ 0:00 /usr/lib/postgresql/8.4/bin/psql nxo_freeswitch
      15753 ? Ss 0:00 postgres: nxo_freeswitch nxo_freeswitch 127.0.0.1(43846) idle in transaction
      15759 ? Ss 0:00 postgres: nxo_freeswitch nxo_freeswitch 127.0.0.1(43847) idle
      15760 ? Ss 0:00 postgres: nxo_freeswitch nxo_freeswitch 127.0.0.1(43848) UPDATE waiting
      15841 ? Ss 0:00 postgres: postgres nxo_freeswitch [local] idle

      Attached("pg_locks.txt") you'll find the output of "select pg_class.relname,pg_locks.pid,pg_locks.mode,pg_locks.granted from pg_class,pg_locks where pg_class.relfilenode=pg_locks.relation and pg_locks.pid in (15753,15760) group by pg_class.relname,pg_locks.pid,pg_locks.mode,pg_locks.granted order by pg_locks.mode;" where 15753,1576 are the PIDs of the locking processes

      I've also attached a snippet of the postgresql-log of the relevant timeframe where the lockup happened(postgresql_log.txt)

      For the sake of completeness, i've also attached "freeswitch.log" for the relevant timeframe(FreeSWITCH in fact freezes after the transaction gets locked, though the last action appears to be a "ORIGINATOR_CANCEL").

      I assume the issue is rather an unixODBC/psql-odbc-issue than a FreeSWITCH related, still i ask you for verification.

      If you need any other information, please let me know.

        Attachments

        1. freeswitch.log
          129 kB
        2. pg_locks.txt
          2 kB
        3. postgresql_log.txt
          320 kB

          Activity

            People

            • Assignee:
              anthm Anthony Minessale II
              Reporter:
              peletiah Christian Benke
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: