You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Conan Wang (JIRA)" <ji...@apache.org> on 2011/05/24 06:07:47 UTC

[jira] [Created] (TS-798) traffic_server crash if add non-existent plugin in remap rule

traffic_server crash if add non-existent plugin in remap rule
-------------------------------------------------------------

                 Key: TS-798
                 URL: https://issues.apache.org/jira/browse/TS-798
             Project: Traffic Server
          Issue Type: Bug
          Components: Remap API
    Affects Versions: 2.1.7, 2.1.8
         Environment: Mac OS X 10.6.7, Centos 5.4
            Reporter: Conan Wang
            Priority: Minor


remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so

start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"

opps.

log:
(http_seq) [HttpSM::do_remap_request] Remapping request
NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0

gdb:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
[Switching to process 7596 thread 0x1703]
RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
157	    toPath = map_to->path_get(&toPathLen);


for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-798:
-----------------------------

    Attachment: TS-798-v2.diff

Slightly cleaned up code.

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: TS-798-v2.diff, TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Conan Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085490#comment-13085490 ] 

Conan Wang commented on TS-798:
-------------------------------

Now duplicate remap rule will produce fatal error.

[Aug 16 10:07:52.013] Server {47884140661120} ERROR: Cannot insert duplicate!
[Aug 16 10:07:52.013] Server {47884140661120} ERROR: Couldn't insert into trie!
[Aug 16 10:07:52.013] Server {47884140661120} ERROR: Could not insert new mapping
[Aug 16 10:07:52.013] Server {47884140661120} WARNING: Could not add rule at line #34; Aborting!
[Aug 16 10:07:52.013] Server {47884140661120} WARNING: [ReverseProxy] Unable to add mapping rule to lookup table at line 34
FATAL: [ReverseProxy] Unable to add mapping rule to lookup table at line 34
/usr/local/bin/traffic_server - STACK TRACE: 
/usr/local/trafficserver/lib/libtsutil.so.3(ink_fatal_va+0x9d)[0x2b8ce50ea4cd]
/usr/local/trafficserver/lib/libtsutil.so.3(ink_fatal+0x88)[0x2b8ce50ea628]
/usr/local/bin/traffic_server(_ZN10UrlRewrite10BuildTableEv+0x585)[0x57dce5]
/usr/local/bin/traffic_server(_ZN10UrlRewriteC1EPKc+0x2fa)[0x57fb4a]
/usr/local/bin/traffic_server(_Z18init_reverse_proxyv+0xec)[0x4dd10c]
/usr/local/bin/traffic_server(_Z20init_HttpProxyServerv+0xb)[0x51d90b]
/usr/local/bin/traffic_server(main+0xc07)[0x4bda57]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x328d21d994]
/usr/local/bin/traffic_server(__gxx_personality_v0+0x479)[0x477f09]

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0, 3.0.0
>
>         Attachments: TS-798-v2.diff, TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-798:
-----------------------------

    Fix Version/s: 3.0.0
         Assignee: Leif Hedstrom

This is actually a more serious problem that it seems, in "error" cases, we actually end up adding broken mapping entries to the lookup tables, and then we free them.

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Eric Balsa (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041786#comment-13041786 ] 

Eric Balsa commented on TS-798:
-------------------------------

My only comment is that we should exit on "remap parsing failure" and not continue startup (as it seems we do now). It would be confusing for users having a remap configuration where only a subset of remap directives were loaded properly due to some parsing error. 

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0
>
>         Attachments: TS-798-v2.diff, TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom resolved TS-798.
------------------------------

    Resolution: Fixed

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0, 3.0.0
>
>         Attachments: TS-798-v2.diff, TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-798:
-----------------------------

    Fix Version/s: 3.0.0

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0, 3.0.0
>
>         Attachments: TS-798-v2.diff, TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-798:
-----------------------------

    Backport to Version: 3.0.0
          Fix Version/s:     (was: 3.0.0)
                         3.1.0

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0
>
>         Attachments: TS-798-v2.diff, TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-798:
-----------------------------

    Attachment: TS-798.diff

I need someone to review these changes. Basically, I've done three things:

1) Delay the "addition" to the mapping containers until a map rules is succesfully initialized.

2) Fixed the Warning state to update the parsing token.

3) Made the error case less draconian, and allow subsequent lines to succeed.


Of these, I'm least sure about 3), should we simply stop parsing the file as the original code as doing in an "error" case? It's hard to judge the differences between a warning case and error case.

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041810#comment-13041810 ] 

Bryan Call commented on TS-798:
-------------------------------

Reviewed the changes and they look good.

However, I would get rid of MAP_WARNING and only use MAP_ERROR.  If you can't add to the table then it is possible to have a server up and running that is not remapping correctly.

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0
>
>         Attachments: TS-798-v2.diff, TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-798) traffic_server crash if add non-existent plugin in remap rule

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-798:
-----------------------------

    Backport to Version:   (was: 3.0.0)

> traffic_server crash if add non-existent plugin in remap rule
> -------------------------------------------------------------
>
>                 Key: TS-798
>                 URL: https://issues.apache.org/jira/browse/TS-798
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Remap API
>    Affects Versions: 2.1.8, 2.1.7
>         Environment: Mac OS X 10.6.7, Centos 5.4
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.0, 3.0.0
>
>         Attachments: TS-798-v2.diff, TS-798.diff
>
>
> remap.config:   map  http://www.example.com/  http://server1.example.com/   @plugin=xxx.so
> start traffic_server at port 8080, then "curl -x 127.0.0.1:8080 http://www.example.com/"
> opps.
> log:
> (http_seq) [HttpSM::do_remap_request] Remapping request
> NOTE: Traffic Server received User Sig 11 from pid: 0 uid: 0
> gdb:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000017
> [Switching to process 7596 thread 0x1703]
> RemapPlugins::run_single_remap (this=0x1010fbd80) at RemapPlugins.cc:157
> 157	    toPath = map_to->path_get(&toPathLen);
> for some reason the plugin is not install correctly, so maybe it's better not to crash. :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira