[jira] [Commented] (TS-948) do not reload bad remap.config

2012-02-25 Thread Brian Geffon (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13216524#comment-13216524
 ] 

Brian Geffon commented on TS-948:
-

Backported to 3.0.x in commit 2f9ccb0e21cdcf8392ee15f909f2b12d8b35d991

 do not reload bad remap.config
 --

 Key: TS-948
 URL: https://issues.apache.org/jira/browse/TS-948
 Project: Traffic Server
  Issue Type: Improvement
  Components: Configuration, Management
Affects Versions: 3.1.0, 3.0.1
Reporter: Conan Wang
Assignee: Leif Hedstrom
Priority: Critical
 Fix For: 3.1.1


 traffic_server will exit if exists bad rules in remap.config, whenever 
 startup or reload ( traffic_line -x ).
 If remap.config is not edited correctly, the server/cluster will crash when 
 reloading.
 It's better to pre-check the remap table and not switch to the new table if 
 remap.config is not enough correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TS-948) do not reload bad remap.config

2011-10-15 Thread Conan Wang (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13128090#comment-13128090
 ] 

Conan Wang commented on TS-948:
---

My test:
return TS_ERROR directly in TSRemapInit

{code}
TSReturnCodeâ‹…
TSRemapInit(TSRemapInterface* api_info, char* errbuf, int errbuf_size)
{
   return TS_ERROR;
{code}

{code}
[Oct 15 14:51:28.411] Server {0x7fff739b6960} WARNING: Failed to initialize 
plugin /Users/conan/box/ts-trunk/libexec/trafficserver/add_header.so (non-zero 
retval) ... bailing out
FATAL: UnixUDPNet.cc:295: failed assert `event != NULL`
/Users/conan/box/ts-trunk/bin/traffic_server - STACK TRACE: 
0   libtsutil.3.dylib   0x000105af6e3b ink_fatal_va + 283
1   libtsutil.3.dylib   0x000105af7144 ink_fatal + 356
2   libtsutil.3.dylib   0x000105af458f _ink_assert + 271
3   traffic_server  0x0001051c9ed5 
_ZN19UDPReadContinuationD1Ev + 85
4   traffic_server  0x0001051ca056 
_ZN14ClassAllocatorI19UDPReadContinuationE4$_44D1Ev + 24
5   traffic_server  0x0001051d452d 
_ZN14ClassAllocatorI19UDPReadContinuationED1Ev + 37
6   traffic_server  0x0001051ca07b __tcf_3 + 27
7   libsystem_c.dylib   0x7fff85e547c8 __cxa_finalize + 274
8   libsystem_c.dylib   0x7fff85e54652 exit + 18
9   traffic_server  0x000104ff0b18 
_ZN10UrlRewrite17load_remap_pluginEPPciP11url_mappingS0_iiPi + 4552
10  traffic_server  0x000104ffa383 
_ZN10UrlRewrite10BuildTableEv + 12757
11  traffic_server  0x000104ffdcf5 
_ZN10UrlRewriteC1EPKc + 2165
12  traffic_server  0x000104ef9ada 
_Z18init_reverse_proxyv + 138
13  traffic_server  0x000104f623bd 
_Z20init_HttpProxyServerv + 13
14  traffic_server  0x000104ecebd9 main + 6073
15  traffic_server  0x000104e582a4 start + 52
[Oct 15 14:51:28.747] Manager {0x7fff739b6960} ERROR: 
[LocalManager::pollMgmtProcessServer] Server Process terminated due to Sig 6: 
Abort trap: 6
{code}

 do not reload bad remap.config
 --

 Key: TS-948
 URL: https://issues.apache.org/jira/browse/TS-948
 Project: Traffic Server
  Issue Type: Improvement
  Components: Configuration, Management
Affects Versions: 3.1.0, 3.0.1
Reporter: Conan Wang
Assignee: Leif Hedstrom
Priority: Critical
 Fix For: 3.1.1


 traffic_server will exit if exists bad rules in remap.config, whenever 
 startup or reload ( traffic_line -x ).
 If remap.config is not edited correctly, the server/cluster will crash when 
 reloading.
 It's better to pre-check the remap table and not switch to the new table if 
 remap.config is not enough correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TS-948) do not reload bad remap.config

2011-10-15 Thread Leif Hedstrom (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13128222#comment-13128222
 ] 

Leif Hedstrom commented on TS-948:
--

Argh, I missed one place ... Fixing it now, thanks for cathing it.

And just to be sure, note that we'll fail to startup the first time if the 
remap file is broken. This is intentional, and I would be hard to convince 
otherwise. What the changes do is to prevent a running server to exit when you 
reload the config.

 do not reload bad remap.config
 --

 Key: TS-948
 URL: https://issues.apache.org/jira/browse/TS-948
 Project: Traffic Server
  Issue Type: Improvement
  Components: Configuration, Management
Affects Versions: 3.1.0, 3.0.1
Reporter: Conan Wang
Assignee: Leif Hedstrom
Priority: Critical
 Fix For: 3.1.1


 traffic_server will exit if exists bad rules in remap.config, whenever 
 startup or reload ( traffic_line -x ).
 If remap.config is not edited correctly, the server/cluster will crash when 
 reloading.
 It's better to pre-check the remap table and not switch to the new table if 
 remap.config is not enough correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TS-948) do not reload bad remap.config

2011-10-13 Thread Leif Hedstrom (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13126780#comment-13126780
 ] 

Leif Hedstrom commented on TS-948:
--

Let me know if this last commit fixes it.

 do not reload bad remap.config
 --

 Key: TS-948
 URL: https://issues.apache.org/jira/browse/TS-948
 Project: Traffic Server
  Issue Type: Improvement
  Components: Configuration, Management
Affects Versions: 3.1.0, 3.0.1
Reporter: Conan Wang
Assignee: Leif Hedstrom
Priority: Critical
 Fix For: 3.1.1


 traffic_server will exit if exists bad rules in remap.config, whenever 
 startup or reload ( traffic_line -x ).
 If remap.config is not edited correctly, the server/cluster will crash when 
 reloading.
 It's better to pre-check the remap table and not switch to the new table if 
 remap.config is not enough correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TS-948) do not reload bad remap.config

2011-10-13 Thread Conan Wang (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13127257#comment-13127257
 ] 

Conan Wang commented on TS-948:
---

Fix that. But returning TS_ERROR in TSRemapInit also crashes. Sorry for 
missing that test in advance.

 do not reload bad remap.config
 --

 Key: TS-948
 URL: https://issues.apache.org/jira/browse/TS-948
 Project: Traffic Server
  Issue Type: Improvement
  Components: Configuration, Management
Affects Versions: 3.1.0, 3.0.1
Reporter: Conan Wang
Assignee: Leif Hedstrom
Priority: Critical
 Fix For: 3.1.1


 traffic_server will exit if exists bad rules in remap.config, whenever 
 startup or reload ( traffic_line -x ).
 If remap.config is not edited correctly, the server/cluster will crash when 
 reloading.
 It's better to pre-check the remap table and not switch to the new table if 
 remap.config is not enough correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TS-948) do not reload bad remap.config

2011-10-11 Thread Leif Hedstrom (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13125265#comment-13125265
 ] 

Leif Hedstrom commented on TS-948:
--

Please try the changes on trunk, I'm closing this for now.

 do not reload bad remap.config
 --

 Key: TS-948
 URL: https://issues.apache.org/jira/browse/TS-948
 Project: Traffic Server
  Issue Type: Improvement
  Components: Configuration, Management
Affects Versions: 3.1.0, 3.0.1
Reporter: Conan Wang
Assignee: Leif Hedstrom
Priority: Critical
 Fix For: 3.1.1


 traffic_server will exit if exists bad rules in remap.config, whenever 
 startup or reload ( traffic_line -x ).
 If remap.config is not edited correctly, the server/cluster will crash when 
 reloading.
 It's better to pre-check the remap table and not switch to the new table if 
 remap.config is not enough correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TS-948) do not reload bad remap.config

2011-10-11 Thread Conan Wang (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13125568#comment-13125568
 ] 

Conan Wang commented on TS-948:
---

My test: 
1. duplicate remap rule and adding non-exist remap plugin now will not crash 
running ATS. I can see WARNING: failed to reload remap.config, not replacing! 
in traffic.out.

2. though bad remap.config is not reloaded, seem TSRemapDeleteInstance 
(TSfree ihandle) of my remap plugin is called according to my debug log. 
However, my remap plugin work well like before, that is, I can still retrieve 
the stored variable in ihandle. I don't know whether there is potential problem.

3. return TS_ERROR in TSRemapNewInstance still crash.
{code}
Server {0x1079f6000} ERROR: Failed to create new instance for plugin 
/Users/conan/box/ts-trunk/libexec/trafficserver/add_header.so (non-zero 
retval)... bailing out
FATAL: UnixUDPNet.cc:295: failed assert `event != NULL`
/Users/conan/box/ts-trunk/bin/traffic_server - STACK TRACE: 
0   libtsutil.3.dylib   0x000102fb05ab ink_fatal_va + 283
1   libtsutil.3.dylib   0x000102fb08b4 ink_fatal + 356
2   libtsutil.3.dylib   0x000102fadcff _ink_assert + 271
3   traffic_server  0x000102684f45 
_ZN19UDPReadContinuationD1Ev + 85
4   traffic_server  0x0001026850c6 
_ZN14ClassAllocatorI19UDPReadContinuationE4$_44D1Ev + 24
5   traffic_server  0x00010268f59d 
_ZN14ClassAllocatorI19UDPReadContinuationED1Ev + 37
6   traffic_server  0x0001026850eb __tcf_3 + 27
7   libsystem_c.dylib   0x7fff872217c8 __cxa_finalize + 274
8   libsystem_c.dylib   0x7fff87221652 exit + 18
9   traffic_server  0x0001024aca9c 
_ZN10UrlRewrite17load_remap_pluginEPPciP11url_mappingS0_iiPi + 8284
10  traffic_server  0x0001024b5473 
_ZN10UrlRewrite10BuildTableEv + 12757
11  traffic_server  0x0001024b8dc5 
_ZN10UrlRewriteC1EPKc + 2165
12  traffic_server  0x0001023b450e 
_Z16reloadUrlRewritev + 350
13  traffic_server  0x0001023b5296 
_ZN21UR_UpdateContinuation19file_update_handlerEiPv + 24
14  traffic_server  0x0001023d7434 
_ZN12Continuation11handleEventEiPv + 148
15  traffic_server  0x0001026a787a 
_ZN7EThread13process_eventEP5Eventi + 418
16  traffic_server  0x0001026a6c85 
_ZN7EThread7executeEv + 191
17  traffic_server  0x0001026a6174 
_ZL21spawn_thread_internalPv + 132
18  libsystem_c.dylib   0x7fff8722e8bf _pthread_start + 335
19  libsystem_c.dylib   0x7fff87231b75 thread_start + 13
{code}

 do not reload bad remap.config
 --

 Key: TS-948
 URL: https://issues.apache.org/jira/browse/TS-948
 Project: Traffic Server
  Issue Type: Improvement
  Components: Configuration, Management
Affects Versions: 3.1.0, 3.0.1
Reporter: Conan Wang
Assignee: Leif Hedstrom
Priority: Critical
 Fix For: 3.1.1


 traffic_server will exit if exists bad rules in remap.config, whenever 
 startup or reload ( traffic_line -x ).
 If remap.config is not edited correctly, the server/cluster will crash when 
 reloading.
 It's better to pre-check the remap table and not switch to the new table if 
 remap.config is not enough correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TS-948) do not reload bad remap.config

2011-10-11 Thread Leif Hedstrom (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13125573#comment-13125573
 ] 

Leif Hedstrom commented on TS-948:
--

On 2, yeas, as expected. It still goes through all instantiatiobs, but 
unwinds on failure . Since this is no different for your plugin whether it 
succeeds or not, it shouldn't matter. You still have to deal with proper 
uninstantiation on every reload.

On 3, bah, missed that special case, nice catch. I'll look at it tomorrow.

 do not reload bad remap.config
 --

 Key: TS-948
 URL: https://issues.apache.org/jira/browse/TS-948
 Project: Traffic Server
  Issue Type: Improvement
  Components: Configuration, Management
Affects Versions: 3.1.0, 3.0.1
Reporter: Conan Wang
Assignee: Leif Hedstrom
Priority: Critical
 Fix For: 3.1.1


 traffic_server will exit if exists bad rules in remap.config, whenever 
 startup or reload ( traffic_line -x ).
 If remap.config is not edited correctly, the server/cluster will crash when 
 reloading.
 It's better to pre-check the remap table and not switch to the new table if 
 remap.config is not enough correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira