-->

2013-08-07

G-WAN

キャッシュは設定かもしれないが、環境によってはエラーの時本体ごと落ちるので注意が必要です。
php-cliを使うようだけど--enable-maintainer-ztsが必要とか?
本体ごと落ちるか切り離すか設定があるとか?
$ ./gwan



allowed sockets: 16384 ('sudo ./gwan' to let G-WAN use more sockets)

loading.
             loan.cs: to use   .cs scripts, install C#...
            hello.py: to use   .py scripts, install Python
            hello.go: to use   .go scripts, install Go
            hello.cs: to use   .cs scripts, install C#....
             argv.cs: to use   .cs scripts, install C#.




G-WAN 4.3.14 (pid:26197)



Signal        : 11:Unknown SIGSEGV problem
Signal src    : 128:.
errno         : 0
Thread        : 1
Code   Pointer: 0000004066e5 (module:gwan, function:??, line:0)
Access Address: 000000000000

Registers     : EAX=203e3d206e6f6973 CS=00000033 EIP=0000004066e5 EFLGS=000000010202
                EBX=7f55993fd000 SS=0000af30 ESP=7f55d3efb030 EBP=000000000080
                ECX=0000002a4943 DS=0000af30 ESI=7f5599446f50 FS=00000033
                EDX=0000002a4940 ES=0000af30 EDI=7f55993fd00c CS=00000033

Module         :Function        :Line # PgrmCntr(EIP)  RetAddress  FramePtr(EBP)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Segmentation fault

$ ./gwan



allowed sockets: 16384 ('sudo ./gwan' to let G-WAN use more sockets)

loading.
             loan.cs: to use   .cs scripts, install C#...
            hello.py: to use   .py scripts, install Python
            hello.go: to use   .go scripts, install Go
            hello.cs: to use   .cs scripts, install C#....
             argv.cs: to use   .cs scripts, install C#.




G-WAN 4.3.14 (pid:26508)



Signal        : 11:Unknown SIGSEGV problem
Signal src    : 128:.
errno         : 0
Thread        : 0
Code   Pointer: 0000004066e5 (module:gwan, function:??, line:0)
Access Address: 000000000000

Registers     : EAX=655a0a3a656e6967 CS=00000033 EIP=0000004066e5 EFLGS=000000010202
                EBX=7f3ecd3fd000 SS=00000007 ESP=7f3f0ca70030 EBP=7f3f0ca70248
                ECX=000000004003 DS=00000007 ESI=7f3ecd43bf80 FS=00000033
                EDX=7f3ecd43cf80 ES=00000007 EDI=7f3ecd3fd00c CS=00000033

Module         :Function        :Line # PgrmCntr(EIP)  RetAddress  FramePtr(EBP)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Segmentation fault

長さランダム
$ diff hello.php{,.2012-12-11_182422} | htmlescape
78,87d77
< ob_start();
< phpinfo();
< function make_seed()
< {
<     list($usec, $sec) = explode(' ', microtime());
<     return (float) $sec + ((float) $usec * 100000);
< }
< mt_srand(make_seed());
< print str_repeat("=", mt_rand(0, 127));
< print nl2br(htmlspecialchars(ob_get_clean()));

1回目はそれっぽい結果。
$ ab -n10000 -c 1000 "http://192.168.0.110:8080/?hello.php" 2>&1 | grep -iP "^((Non-2xx responses)|(Failed requests)|(   \\(Connect)|(Complete requests)|(Requests per second)):"
Complete requests:      10000
Failed requests:        10251
   (Connect: 0, Receive: 0, Length: 10251, Exceptions: 0)
Requests per second:    4098.55 [#/sec] (mean)

キャッシュ?
$ ab -n10000 -c 1000 "http://192.168.0.110:8080/?hello.php" 2>&1 | grep -iP "^((Non-2xx responses)|(Failed requests)|(   \\(Connect)|(Complete requests)|(Requests per second)):"
Complete requests:      10000
Failed requests:        0
Requests per second:    7014.31 [#/sec] (mean)

mt_rand(0, 127) => mt_rand(0, 65535)
とかにすると落ちたりもう一回起動すると大丈夫だったり。
Content-Lengthが変わるはずだけど変わらない。

0 件のコメント: