Re: Segmentation Fault in error handler

Raymond R Rankins <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <OF1A57F45E.74A0749E-ON8525788D.007972B7-8525788D.0079AED2@notes.health.state.ny.us>
Attached is the tdsdump file.

-Ray

(See attached file: freetds.log)



From:	Igor Korot <[email protected]>
To:	FreeTDS Development Group <[email protected]>
Date:	05/11/2011 05:44 PM
Subject:	Re: [freetds] Segmentation Fault in error handler
Sent by:	[email protected]



Hi,
Could you try to produce the TDSDUMP or run under gdb to see the backtrace?

Thank you.

On Wed, May 11, 2011 at 1:24 PM, Raymond R Rankins
<[email protected]> wrote:
>
> Sorry, forgot to mention, I'm running TDS version .91RC2
>
> Sybase TDS protocol version 5.0
> SQL Server TDS protocol version 8.0
>
> -Ray
>
>
>
>
> From:   Raymond R Rankins <[email protected]>
> To:     FreeTDS Development Group <[email protected]>
> Date:   05/11/2011 04:12 PM
> Subject:        [freetds] Segmentation Fault in error handler
> Sent by:        [email protected]
>
>
>
> I'm testing out fisql to run some queries and when there's an error with
> severity > 10 which invokes the error handler, it's causing a
segmentation
> fault and dumping the core.
> This is happening if I connect to SQL Server or to Sybase.
>
> Below are examples of what's happening:
>
> Error raised in SQL Server
> ----------------------------------------------
> Msg 2812, Level 16, State 62:
> Server 'CHPLUSSQL01', Line 1:
> Could not find stored procedure 'sp_modifystats'.
> DB-LIBRARY error:
>        General SQL Server error: Check messages from the SQL Server
> Segmentation Fault - core dumped
>
>
> Error raised in Sybase
> ----------------------------------------------
> Msg 2812, Level 16, State 5:
> Server 'CHPDEV', Line 1:
> Stored procedure 'sp_modstats' not found. Specify owner.objectname or use
> sp_help to check whether the object exists (sp_help may produce lots of
> output).
>
> DB-LIBRARY error:
>        General SQL Server error: Check messages from the SQL Server
> Segmentation Fault - core dumped
>
>
> My guess is this may be an issue with the default error handler in dblib?
>
> -Ray
>
> IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential
> or sensitive information which is, or may be, legally privileged or
> otherwise protected by law from further disclosure. It is intended only
for
> the addressee. If you received this in error or from someone who was not
> authorized to send it to you, please do not distribute, copy or use it or
> any attachments. Please notify the sender immediately by reply e-mail and
> delete this from your system. Thank you for your cooperation.
>
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
> IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure. It is
intended only for the addressee. If you received this in error or from
someone who was not authorized to send it to you, please do not distribute,
copy or use it or any attachments. Please notify the sender immediately by
reply e-mail and delete this from your system. Thank you for your
cooperation.
>
>
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
>
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds

IMPORTANT NOTICE: This e-mail and any attachments may contain confidential or sensitive information which is, or may be, legally privileged or otherwise protected by law from further disclosure. It is intended only for the addressee. If you received this in error or from someone who was not authorized to send it to you, please do not distribute, copy or use it or any attachments. Please notify the sender immediately by reply e-mail and delete this from your system. Thank you for your cooperation.

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
graycol.gif (image/gif, 105 B) - not displayed
freetds.log (application/octet-stream, 9.6 KB)
log.c:196:Starting log file for FreeTDS 0.91RC2
	on 2011-05-11 18:06:13 with debug flags 0x4fff.
iconv.c:330:tds_iconv_open(2c6d0, ISO-8859-1)
iconv.c:187:local name for ISO-8859-1 is ISO8859-1
iconv.c:187:local name for UTF-8 is UTF-8
iconv.c:187:local name for UCS-2LE is UCS-2LE
iconv.c:187:local name for UCS-2BE is UCS-2BE
iconv.c:349:setting up conversions for client charset "ISO-8859-1"
iconv.c:351:preparing iconv for "ISO-8859-1" <-> "UCS-2LE" conversion
iconv.c:391:preparing iconv for "ISO-8859-1" <-> "UCS-2LE" conversion
iconv.c:394:tds_iconv_open: done
net.c:205:Connecting to 192.168.15.205 port 1433 (TDS version 7.1)
net.c:270:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:310:tds_open_socket() succeeded
util.c:156:Changed query state from DEAD to IDLE
net.c:741:Sending packet
0000 12 01 00 34 00 00 00 00-00 00 15 00 06 01 00 1b |...4.... ........|
0010 00 01 02 00 1c 00 0c 03-00 28 00 04 ff 08 00 01 |........ .(......|
0020 55 00 00 02 4d 53 53 51-4c 53 65 72 76 65 72 00 |U...MSSQ LServer.|
0030 26 21 00 00            -                        |&!..|

net.c:555:Received header
0000 04 01 00 25 00 00 01 00-                        |...%....|

net.c:609:Received packet
0000 04 01 00 25 00 00 01 00-00 00 15 00 06 01 00 1b |...%.... ........|
0010 00 01 02 00 1c 00 01 03-00 1d 00 00 ff 0a 32 09 |........ ......2.|
0020 79 00 00 02 00         -                        |y....|

login.c:1057:detected flag 2
login.c:782:quietly sending TDS 7+ login packet
token.c:328:tds_process_login_tokens()
net.c:555:Received header
0000 04 01 01 9d 00 45 01 00-                        |.....E..|

net.c:609:Received packet
0000 04 01 01 9d 00 45 01 00-e3 27 00 01 0c 6b 00 69 |.....E.. .'...k.i|
0010 00 64 00 73 00 5f 00 73-00 71 00 6c 00 73 00 72 |.d.s._.s .q.l.s.r|
0020 00 76 00 72 00 06 6d 00-61 00 73 00 74 00 65 00 |.v.r..m. a.s.t.e.|
0030 72 00 ab 78 00 45 16 00-00 02 00 2b 00 43 00 68 |r..x.E.. ...+.C.h|
0040 00 61 00 6e 00 67 00 65-00 64 00 20 00 64 00 61 |.a.n.g.e .d. .d.a|
0050 00 74 00 61 00 62 00 61-00 73 00 65 00 20 00 63 |.t.a.b.a .s.e. .c|
0060 00 6f 00 6e 00 74 00 65-00 78 00 74 00 20 00 74 |.o.n.t.e .x.t. .t|
0070 00 6f 00 20 00 27 00 6b-00 69 00 64 00 73 00 5f |.o. .'.k .i.d.s._|
0080 00 73 00 71 00 6c 00 73-00 72 00 76 00 72 00 27 |.s.q.l.s .r.v.r.'|
0090 00 2e 00 0b 43 00 48 00-50 00 4c 00 55 00 53 00 |....C.H. P.L.U.S.|
00a0 53 00 51 00 4c 00 30 00-31 00 00 01 00 e3 08 00 |S.Q.L.0. 1.......|
00b0 07 05 09 04 d0 00 34 00-e3 17 00 02 0a 75 00 73 |......4. .....u.s|
00c0 00 5f 00 65 00 6e 00 67-00 6c 00 69 00 73 00 68 |._.e.n.g .l.i.s.h|
00d0 00 00 ab 70 00 47 16 00-00 01 00 27 00 43 00 68 |...p.G.. ...'.C.h|
00e0 00 61 00 6e 00 67 00 65-00 64 00 20 00 6c 00 61 |.a.n.g.e .d. .l.a|
00f0 00 6e 00 67 00 75 00 61-00 67 00 65 00 20 00 73 |.n.g.u.a .g.e. .s|
0100 00 65 00 74 00 74 00 69-00 6e 00 67 00 20 00 74 |.e.t.t.i .n.g. .t|
0110 00 6f 00 20 00 75 00 73-00 5f 00 65 00 6e 00 67 |.o. .u.s ._.e.n.g|
0120 00 6c 00 69 00 73 00 68-00 2e 00 0b 43 00 48 00 |.l.i.s.h ....C.H.|
0130 50 00 4c 00 55 00 53 00-53 00 51 00 4c 00 30 00 |P.L.U.S. S.Q.L.0.|
0140 31 00 00 01 00 ad 36 00-01 71 00 00 01 16 4d 00 |1.....6. .q....M.|
0150 69 00 63 00 72 00 6f 00-73 00 6f 00 66 00 74 00 |i.c.r.o. s.o.f.t.|
0160 20 00 53 00 51 00 4c 00-20 00 53 00 65 00 72 00 | .S.Q.L.  .S.e.r.|
0170 76 00 65 00 72 00 00 00-00 00 0a 32 09 79 e3 13 |v.e.r... ...2.y..|
0180 00 04 04 34 00 30 00 39-00 36 00 04 34 00 30 00 |...4.0.9 .6..4.0.|
0190 39 00 36 00 fd 00 00 00-00 00 00 00 00          |9.6..... .....|

token.c:337:looking for login token, got  e3(ENVCHANGE)
token.c:122:tds_process_default_tokens() marker is e3(ENVCHANGE)
dblib.c:327:db_env_chg(2c6d0, 1, master, kids_sqlsrvr)
token.c:337:looking for login token, got  ab(INFO)
token.c:122:tds_process_default_tokens() marker is ab(INFO)
token.c:2591:tds_process_msg() reading message 5701 from server
token.c:2664:tds_process_msg() calling client msg handler
dbutil.c:85:_dblib_handle_info_message(2db68, 2c6d0, ffbeec1c)
dbutil.c:86:msgno 5701: "Changed database context to 'kids_sqlsrvr'."
token.c:2677:tds_process_msg() returning TDS_SUCCEED
token.c:337:looking for login token, got  e3(ENVCHANGE)
token.c:122:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2422:tds_process_env_chg(): 5 bytes of collation data received
token.c:2423:tds->collation was
0000 00 00 00 00 00         -                        |.....|

iconv.c:988:setting server single-byte charset to "CP1252"
iconv.c:469:tds_iconv_info_init: cannot convert "ISO-8859-1"->"CP1252"
iconv.c:474:tds_iconv_info_init: cannot convert "CP1252"->"ISO-8859-1"
token.c:2433:tds->collation now
0000 09 04 d0 00 34         -                        |....4|

token.c:337:looking for login token, got  e3(ENVCHANGE)
token.c:122:tds_process_default_tokens() marker is e3(ENVCHANGE)
dblib.c:327:db_env_chg(2c6d0, 2, , us_english)
token.c:337:looking for login token, got  ab(INFO)
token.c:122:tds_process_default_tokens() marker is ab(INFO)
token.c:2591:tds_process_msg() reading message 5703 from server
token.c:2664:tds_process_msg() calling client msg handler
dbutil.c:85:_dblib_handle_info_message(2db68, 2c6d0, ffbeec1c)
dbutil.c:86:msgno 5703: "Changed language setting to us_english."
token.c:2677:tds_process_msg() returning TDS_SUCCEED
token.c:337:looking for login token, got  ad(LOGINACK)
token.c:376:server reports TDS version 71.0.0.1
token.c:378:Product name for 0x71000001 is 2000 SP1
token.c:337:looking for login token, got  e3(ENVCHANGE)
token.c:122:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2480:changing block size from 4096 to 4096
dblib.c:327:db_env_chg(2c6d0, 4, 4096, 4096)
token.c:337:looking for login token, got  fd(DONE)
token.c:122:tds_process_default_tokens() marker is fd(DONE)
token.c:2342:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2358:tds_process_end() state set to TDS_IDLE
token.c:2373:                rows_affected = 0
token.c:441:tds_process_login_tokens() returning TDS_SUCCEED
mem.c:615:tds_free_all_results()
util.c:156:Changed query state from IDLE to QUERYING
write.c:140:tds_put_string converting 19 bytes of "set textsize 64512 "
write.c:168:tds_put_string wrote 38 bytes
util.c:156:Changed query state from QUERYING to PENDING
net.c:741:Sending packet
0000 01 01 00 2e 00 00 00 00-73 00 65 00 74 00 20 00 |........ s.e.t. .|
0010 74 00 65 00 78 00 74 00-73 00 69 00 7a 00 65 00 |t.e.x.t. s.i.z.e.|
0020 20 00 36 00 34 00 35 00-31 00 32 00 20 00       | .6.4.5. 1.2. .|

token.c:543:tds_process_tokens(2c6d0, ffbeed58, ffbeed54, 0x100)
util.c:156:Changed query state from PENDING to READING
net.c:555:Received header
0000 04 01 00 11 00 45 01 00-                        |.....E..|

net.c:609:Received packet
0000 04 01 00 11 00 45 01 00-fd 00 00 be 00 00 00 00 |.....E.. ........|
0010 00                     -                        |.|

token.c:558:processing result tokens.  marker is  fd(DONE)
token.c:2342:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2358:tds_process_end() state set to TDS_IDLE
util.c:156:Changed query state from READING to IDLE
token.c:2373:                rows_affected = 0
util.c:104:logic error: cannot change query state from IDLE to PENDING
token.c:543:tds_process_tokens(2c6d0, ffbeed58, ffbeed54, 0x100)
token.c:546:tds_process_tokens() state is COMPLETED
dblib.c:239:dblib_add_connection(ff341350, 2c6d0)
dblib.c:4298:dbsetopt(2bfc8, 23, 
, 1)
dblib.c:4298:dbsetopt(2bfc8, 21,  , 1)
dblib.c:3177:dbcancel(2bfc8)
query.c:2157:tds_send_cancel: not in_cancel and idle
dblib.c:5863:dbfreebuf(2bfc8)
dblib.c:1297:dbcmd(2bfc8, exec missing_proc)
dblib.c:1304:dbcmd() bufsz = 0
dblib.c:1297:dbcmd(2bfc8, 
)
dblib.c:1304:dbcmd() bufsz = 18
dblib.c:4429:dbsetinterrupt(2bfc8, 15720, 15780)
dblib.c:1354:dbsqlexec(2bfc8)
dblib.c:6843:dbsqlsend(2bfc8)
mem.c:615:tds_free_all_results()
util.c:156:Changed query state from IDLE to QUERYING
write.c:140:tds_put_string converting 18 bytes of "exec missing_proc
"
write.c:168:tds_put_string wrote 36 bytes
util.c:156:Changed query state from QUERYING to PENDING
net.c:741:Sending packet
0000 01 01 00 2c 00 00 01 00-65 00 78 00 65 00 63 00 |...,.... e.x.e.c.|
0010 20 00 6d 00 69 00 73 00-73 00 69 00 6e 00 67 00 | .m.i.s. s.i.n.g.|
0020 5f 00 70 00 72 00 6f 00-63 00 0a 00             |_.p.r.o. c...|

dblib.c:4620:dbsqlok(2bfc8)
dblib.c:4650:dbsqlok() not done, calling tds_process_tokens()
token.c:543:tds_process_tokens(2c6d0, ffbef064, ffbef058, 0x6914)
util.c:156:Changed query state from PENDING to READING
net.c:555:Received header
0000 04 01 00 94 00 45 01 00-                        |.....E..|

net.c:609:Received packet
0000 04 01 00 94 00 45 01 00-aa 80 00 fc 0a 00 00 3e |.....E.. .......>|
0010 10 2f 00 43 00 6f 00 75-00 6c 00 64 00 20 00 6e |./.C.o.u .l.d. .n|
0020 00 6f 00 74 00 20 00 66-00 69 00 6e 00 64 00 20 |.o.t. .f .i.n.d. |
0030 00 73 00 74 00 6f 00 72-00 65 00 64 00 20 00 70 |.s.t.o.r .e.d. .p|
0040 00 72 00 6f 00 63 00 65-00 64 00 75 00 72 00 65 |.r.o.c.e .d.u.r.e|
0050 00 20 00 27 00 6d 00 69-00 73 00 73 00 69 00 6e |. .'.m.i .s.s.i.n|
0060 00 67 00 5f 00 70 00 72-00 6f 00 63 00 27 00 2e |.g._.p.r .o.c.'..|
0070 00 0b 43 00 48 00 50 00-4c 00 55 00 53 00 53 00 |..C.H.P. L.U.S.S.|
0080 51 00 4c 00 30 00 31 00-00 01 00 fe 02 00 e0 00 |Q.L.0.1. ........|
0090 00 00 00 00            -                        |....|

token.c:558:processing result tokens.  marker is  aa(ERROR)
token.c:122:tds_process_default_tokens() marker is aa(ERROR)
token.c:2591:tds_process_msg() reading message 2812 from server
token.c:2664:tds_process_msg() calling client msg handler
dbutil.c:85:_dblib_handle_info_message(2db68, 2c6d0, ffbeee9c)
dbutil.c:86:msgno 2812: "Could not find stored procedure 'missing_proc'."
dblib.c:4861:dbdead(2bfc8) [alive]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.