« first day (1855 days earlier)      last day (3111 days later) » 

12:00 AM
I'm not even going to respond to that
 
4 messages moved to bin
 
the worst is that I see people damning the whole Islam all over the place… instead of the terrorists…
 
that's only what some in the government want you to believe.
so better fight against that ignorance.
 
please don't flag messages
 
12:05 AM
gn8
 
@hakre meh, I mean on twitter
 
5 messages moved to bin
 
Why the hell do I get notified of flags when I can't do anything about them!
 
@DaveyShafik just figured out that we work for the same company, howdy! :)
 
@salathe you work for a company?
 
12:07 AM
Train Wreck or something...
 
... not sure what to make of that ...
 
@bwoebi Twitter is no venue to fight ignorance, whoever thinks he must express something "important" (tm) with that little text is outright ignorant to begin with.
 
@salathe :-P
 
it's official, @salathe works for the company
 
Abe
@Danack just for the record, that was an old tweet and unrelated to recent events
 
12:08 AM
actually not heard anything from EngineYard for a while, they just on cruise control right now?
 
@hakre right… I'm just seeing it all over the place though … makes me a little sad… definitely not sure what's worse… the actual events or some peoples reaction…
 
well, facebook is down
 
 
@Leigh probably all fell apart when @DaveyShafik left :P
 
Anonymous
@ircmaxell works for me
 
12:10 AM
@salathe never heard of him
 
Reddit's server admins are having a bad day also.
 
Today has been such a strange day. I got a solid offer on a domain I own (\o/) and some other positive things… and this Paris stuff.
Who offers money on domains (and it looks to be a person, not a robot) at times like this?
 
@Leigh oh I figured you had, given the EY comment
 
@LeviMorrison depends on the domain name and the requester…
 
@salathe Oh you got me, my ability to remember useless facts is supernatural
 
12:14 AM
@bwoebi I can imagine even I don't browse Twitter often.
 
@salathe you're with Akamai?
 
Akamai are really terrible at conference swag
 
@DaveyShafik yeah, only just joined as part of an acquisition
 
oh right, you're with Bloxx :)
welcome aboard! :D
 
they gave me a TSA certified baggage lock
 
12:25 AM
@DaveyShafik Bingo, and thanks. :)
 
@Leigh I'm trying to figure out who's in charge of that kinda stuff — so we can do better :)
 
Worse, the conference was 44con
 
Don't know it
 
giving away TSA locks at a security conference, ...
defcon... but UK
 
lol
 
12:26 AM
well, ok, not defcon...
 
@Leigh … wow.
 
but the biggest we have
 
I mean, I can kinda see how they'd make that connection, but really?
were they branded?
 
I can't remember, I gave it away
 
@DaveyShafik Was it not like... ironic maybe?
 
12:27 AM
@Sara let's hope!
 
Their sales pitch was also directly attacking cloudflare
which wasn't very cool
 
@Sara I was about to link you to the updated "ironic" video, but then remembered it was you that posted it :-P
 
@Leigh hrm, internally we really don't care much about Cloudflare. We track them, and they're doing some cool stuff (like the DNSSEC stuff they just announced), but they're not really going after the same markets
 
@DaveyShafik the conference a year ago, (not the one just gone), Akami was there touting their CDN (which is what they're known for, mostly)
 
Abe
18k missing in japan. what a nice day
 
12:29 AM
maybe it was just the sales guys
doing their thing
I'm never in a position to buy, so I just let them talk :)
 
@Leigh heh
@salathe FTR, I've been at Akamai since July, so I'm still pretty new. We do some amazing things though :)
 
In the last 12 hours I've executed a php binary 50 million times, and it's only crashed once
 
@Leigh wtf did it not crash zero times!?
 
@bwoebi it crashed with this
$ base64 afl-out/f4/crashes/id\:000000\,sig\:11\,src\:001299+010111\,op\:splice\,rep\:2
PD9zdGF0aWM6OklkZf9pdVl0FgItNxYuFhYWADg3FhYrFkAPAgAtNzsKCg==
 
what's that?
 
12:38 AM
I had to encode it because it has magic in it
 
is that the script?
 
but it seems to only crash the binary on the test system, so I think it might be due to the extra instrumentation
yes
fuzzer input
 
ah
 
Can anyone point me to where the curl extension creates it's resources for curl handles? I'm just not having any luck :/
 
search for curl_easy_init
I think...
yeah, that
 
12:42 AM
zend_register_resource?
 
yeah, looking in interface.c, seems pretty bog standard, am I not understanding what you're looking for?
 
@Sara I can't seem to replicate it :/
 
@Abe you misread it, that was the previous tsunami.
 
there's ch = alloc_curl_handle(); then ch->cp = cp (where cp = curl_easy_init())
but if I do the same, except cp is an argument CURL *easy it blows up :/
 
Abe
@Danack i didn't misread it, it's the quality of information on twitter :B
 
12:45 AM
heh opcodes am I right?
 
	php_curl *ch;
	alloc_curl_handle(ch);
	ch->cp = easy;
 
@DaveyShafik curl_init is pretty succinct with registering the resource
 
uhm, isn't it ch = alloc_curl_handle(); ?
 
@Leigh that's why it's so frustrating :/
o.O
@bwoebi that might be it
 
@DanLugg yup, how may I help you?
 
12:47 AM
static void alloc_curl_handle(php_curl **ch)
on 5.6
 
yeah, but he's writing code for 7.
 
woo segfault!
yeah… that didn't work :/
 
well, what's your whole init code…?
 
/me commits
Program received signal SIGSEGV, Segmentation fault.
0x00000001000f9bf3 in _php_server_push_callback (parent_ch=0x10102a208, easy=0x102025808, num_headers=4, headers=0x7fff5fbfdce8, userp=0x1018661c0) at ext/curl/multi.c:423
423		parent->cp = parent_ch;
(gdb) bt
#0  0x00000001000f9bf3 in _php_server_push_callback (parent_ch=0x10102a208, easy=0x102025808, num_headers=4, headers=0x7fff5fbfdce8, userp=0x1018661c0) at ext/curl/multi.c:423
 
well code looks fine to me…
at least around line 423
after all, parent should be now directly stem from an ecalloc()…
 
1:00 AM
and yet…
so, &parent->cp == (CURL **) 0xc78300 but parent->cp == Cannot access memory at address 0xc78300
 
either you're using an old build or something else is bogus, but these few lines aren't.
(I'm guessing old build, at least that looks plausible to me as parent address seems to be random stack data)
 
@bwoebi this is php-src/master
I'll rebase in the latest just to be sure
 
@DaveyShafik I mean that you are testing a wrong binary…
 
@bwoebi of PHP?
 
Anonymous
Is there a free PHP code coverage tool available online?
 
1:06 AM
@samayo xhprof + xhgui
oh wait, code coverage?
for public repos, scrutinizer is OK
 
Anonymous
scrutinizer is just ... scrutinizer .
 
@DaveyShafik yeah, the wrong cli binary… like you forgot to make, make didn't update the object file or something similar…
 
Anonymous
it rates code quality only right?
 
@bwoebi I'm literally ./sapi/cli/php in php-src
I'll make clean and make again
@samayo part of that rating is based on code coverage
@samayo which can be reported by Travis
 
Anonymous
Hm, so where does that {coverage | int} badge come from?
 
1:08 AM
Build complete.
Don't forget to run 'make test'.


2015-11-13 20:07:49 ☆ bos-mpq0v in ~/src/php-src
± |curl-http2-push → dshafik ↑116 ↓1 {3} ?:4 ✗| → gdb --args ./sapi/cli/php push.php https://localhost:8080/php
GNU gdb (GDB) 7.10
Program received signal SIGSEGV, Segmentation fault.
0x00000001000f9683 in _php_server_push_callback (parent_ch=0x101828808, easy=0x101019008, num_headers=4, headers=0x7fff5fbfdcc8, userp=0x100e661c0) at ext/curl/multi.c:423
423 parent->cp = parent_ch;
^^ @bwoebi that's from a fresh build
 
… what
 
@bwoebi what what? :P
 
what what what?
 
could you please give me push.php so that I can try myself?
what!
 
it also needs the node.js server to push to it though, i can open mine up, one sec
point it at: 6b77bbad.ngrok.com
(port 80, any path will work)
(it's https)
 
1:16 AM
@DaveyShafik /me has aerys ;-D
 
@bwoebi that supports HTTP/2 push? :)
 
sure :-D
 
oh… OK then :)
 
Response::push()
 
(and good, because it's falling over :P)
 
1:17 AM
@DaveyShafik falling over to Link:preload? yea
 
yeah
actually, not in this case
 
woah, those are some serious flags
 
my local curl version is too old… installing curl…
 
1:37 AM
@bwoebi yeah, I wrote up instructions for OS X to help test this
 
1:47 AM
@DaveyShafik can't repro any segfault
 
@bwoebi so it… works?
because I haven't finished the resource registration and such yet :P
 
well, the reason is that nothing is pushed, lol… wait.
 
yeah, there was a bug in Aerys still using http/1.1 filters…
instead of the http/2.0 ones
only happens if connection is started via a h2c upgrade request…
@DaveyShafik well, the push promise is sent now
 
@bwoebi and? no segfault?
 
2:02 AM
but no code is executed on it
it waits for like 5 sec and then terminates
but the closure isn't executed
 
well, the args are all wrong, but that's different to my behavior :/
 
but yeah, no segfault
 
well, that's fucked up
@bwoebi what OS?
 
hmm, the offending code isn't called at all here…
OS X.
(per the debugger)
 
are you sure the push is happening? try it with nghttp?
 
2:06 AM
push is happening per wireshark
@DaveyShafik nghttp doesn't do upgrade via http/1.1 …
 
it doesn't?
because curl uses it and it doesn't support any other mechanism right now
 
nah, directly uses PRI *
@DaveyShafik just for now, can you give me that host you're testing against so that I can see?
 
@bwoebi I can't seem to expose it via ngrok for some reason, but give me a sec, if you have node, you can easily run it locally
 
Bobs-MacBook-Pro-2:php-src bob$ node --version
v0.10.33
as long as it isn't too old…
 
oh, that is :/
lemme try to expose it
 
2:20 AM
oh wait
lol
 
here we go, @bwoebi: https://0.tcp.ngrok.io:38380
 
nice, got segfault, ty ^^
 
(lldb) p ch
(php_curl *) $21 = 0x0000000101676300
// continue to leave func… wtf?
(lldb) p parent
(php_curl *) $22 = 0x0000000001676300
why is the pointer truncated!?
 
2:36 AM
(lldb) p/x $eax
(unsigned int) $67 = 0x02076300
(lldb) p/x $rax
(unsigned long) $68 = 0x0000000102076300
uhm yeah…
 
¯_(ツ)_/¯
 
result is interpreted as 32 bit pointer????
and then movslq to sign extend to 64 bit!?
some function header signature must be bad…
aaaah obviously
 
@bwoebi hrm?
 
you made the function non-static
but didn't define it in an header file
so C assumes by definition a return type of int…
which is 32 bit in most cases
 
oooooooh
man that's insidious.
 
2:40 AM
I'm sure compiler should have given you a warning…
 
I was going to be snarky earlier.....your compiler warnings might not be agressive/sane enough.
 
/Users/Bob/Downloads/php-src/ext/curl/multi.c:422:11: warning: implicit declaration of function 'alloc_curl_handle' is invalid in C99 [-Wimplicit-function-declaration]
        parent = alloc_curl_handle();
                 ^
/Users/Bob/Downloads/php-src/ext/curl/multi.c:422:9: warning: incompatible integer to pointer conversion assigning to 'php_curl *' from 'int' [-Wint-conversion]
        parent = alloc_curl_handle();
               ^ ~~~~~~~~~~~~~~~~~~~
/Users/Bob/Downloads/php-src/ext/curl/multi.c:425:5: warning: incompatible integer to pointer conversion assigning to 'php_curl *' from 
I assumed you checked your warnings :-(
 
I… missed that one :/
 
Doesn't PHP src currently compile correctly with CFLAGS="-Werror -Wall" ?
 
so what should the definition be?
php_curl *alloc_curl_handle();
 
2:43 AM
yep
And as I told you, this part of code was correct.
 
Hrm, I added it to php_curl.h and still get the warning
 
sure…? I don't…
 
hrm.
looks like it might be good now
 
I now get a segfault, but at some totally unrelated place
 
> One of the projects I work alongside (but not really on) is full of legacy PHP command line scripts that read in gigabytes of CSVs, do some calculations, get some results from some DBs, and then create a new table. Currently, this process takes around two months, and large part of that is due to some of these scripts which take 8 hours to run failing at 3am at night.
 
2:48 AM
:-)
 
Good lord.
 
0x00000001000f8d25 in zval_addref_p (pz=0x7fff5fbfdc70) at /Users/dshafik/src/php-src/Zend/zend_types.h:822 ?
 
yep
 
OK, probably due to the fact I'm not doing the resources right :)
 
maybe, didn't have a closer look.
 
2:49 AM
so, is php_curl * alloc_curl_handle(); different from php_curl *alloc_curl_handle(); ?
(space between * and alloc_curl_handle())
 
no?
 
I assumed not, but the former worked, the latter didn't.
I think some weird caching was happening on my setup
 
probably…
at least headers don't trigger an object file rebuild…
 
OK, what's the magic with return_value ?
 
@DaveyShafik I'm glad I'm not the only one who dislikes this.
 
2:59 AM
I'm assuming it has something to do with the PHP_FUNCTION macro, but hell if I can figure out where that's defined
 
@DaveyShafik right, it's passed in inside the PHP_FUNCTION
 
and it's what? a zval?
 
yep, zval*.
that's why we have RETVAL_* macros which should hide it… but…
 
grrrr
 
@JoeWatkins can you read my mind?
 
3:11 AM
@JoeWatkins gr, grr, grrr :-D
 
MORNIN syscall triggered: Good morning @AnmolRaghuvanshiVersion1.0
 
I was grumbling because it's 3am, and I just woke up ... again ...
 
3am....Saturday morning.....time for some dancing....
 
resources are awful, and everything about them is awful :(
 
3:16 AM
@bwoebi ahh you gave me some new topic to read :)
 
@DaveyShafik Indeed.
Once you have figured out your immediate curl needs you should port it to use a curl obejct instead :D
 
HOLY CRAP! IT WORKS (sorta)
@LeviMorrison that's a whole other RFC ;)
 
@LeviMorrison actually, we should have a RFC to abolish resource, not to do it one-by-one ^^
 
So, my callback is called, with what I'm passing it, but I have some memory issues I need to figure out
php(92547,0x7fff78e50300) malloc: *** error for object 0x102815a00: pointer being freed was not allocated
any suggestions for where to look?
 
@bwoebi Doing it one by one may be a more sane tactic though.
 
3:29 AM
@LeviMorrison well… what uses resources actually in PHP?
 
file system stuff
curl
mysql (gone, \o/)
 
Anyway, thanks @DaveyShafik for having that curl issue… now I could: github.com/amphp/aerys/commit/… … wouldn't have noticed there were an issue without ;-)
ext/sockets too
what else?
 
streams?
 
nah, is sharing with fs stuff
 
3:32 AM
gd would be a big one
(in terms of potential breakage)
grep -Ril "zend_register_resource" ./ext/ should tell you everything, no?
 
@DaveyShafik not sure why it'd break much… just explicit is_resource() would break.
 
and if so, it's not many places
 
everything else is pretty internal
 
Abe
it could return a gd object rather than a "gd resource". unless the code is doing is_resource, it won't break anything, no?
 
@bwoebi not if is_resource() can handle the new objects :)
 
3:33 AM
Shouldn't.
 
I mean, surely you can just have a flag that says it's a resource object, and is_resource() can check for that and return true
 
@DaveyShafik this function would be then removed …
 
@bwoebi make it deprecated, and then remove in 8?
 
Abe
@bwoebi class GDObject implements resource{} returning true on is_resource(). with it being an internal interface that can't be implemented in userland? worth it?
 
in favor of instanceof
 
3:36 AM
@Danack may you try to fix this on imagick side: bugs.php.net/bug.php?id=70899 ?
@Abe possibly, but should be removed in 8 then.
 
@bwoebi @Abe that's basically what I had in mind… and would vote +1
 
Abe
yeah, for removing it later in a major version
 
@bwoebi why not make a pull-request?
 
@Danack because I'm an absolute zero at m4 syntax ;-D
and I can't repro the issue locally so I don't know whether I'll have it fixed…
(that's part OS X fault…)
anyway, gn8.
 
Abe
gn!
 
3:48 AM
so close :(
just need to fix that issue above :/
(and then figure out how to create an entirely new type of resource, ಠ_ಠ)
 
@bwoebi There's a patch in the bug report that says it fixes the issue. Even if I felt like changing Imagick, you'll need to fix the bug anyway - as the m4 stuff that is breaking is valid m4 config:
m4_include(ifdef('PHP_IMAGICK_STATIC',PHP_EXT_BUILDDIR(imagick)[/],)[imagemagick.m4])
(I guessing it's valid...you can never really tell with that stuff....)
 
@Danack I don't see how that patch should work as it looks buggy to me ( I have oulined that in a comment)
 
Abe
@DaveyShafik are you going to make the interface resource thing?
 
@Abe no
 
3:50 AM
me, saying things ...
 
@Abe that's far beyond me :)
 
Abe
hope someone starts it though, the sooner we get it the sooner we get rid of resource
 
@Abe I'm happy to write the RFC :)
@Abe and if someone shows me a sample of migrating one extension, I can possibly figure out others, but I'll need a guide :)
 
what justification is there for removing resources ?
 
Abe
gd seems the only widely used extension using resources, and mysql, but that is going to die finally
 
3:53 AM
and all of streams layer
(good luck rewriting that by the way)
 
Abe
@DaveyShafik oh would love to help but we are on the same boat i'm afraid :D
 
@JoeWatkins Anatol wants to do that…
 
Currently GMP is based on resources. This has several disadvantages:

Cannot be serialized
Cannot be directly cast to int/float/string
Cannot be (meaningfully) dumped using var_dump
Coerces to an integer by returning the resource ID. This can easily lead to bugs if you accidentally use the resource with an arithmetic operation. For example a GMP factorial test from out testsuite has been computing the factorial of the resource ID, rather than the factorial of the number.
Cannot make use of the new operator overloading APIs
there's your reasons
 
and anyway, the resoucres part of stream layer is small and replaceable…
 
@JoeWatkins you can't type them properly e.g. function writeToFile($data, resource $fileHandle) {} also accepts GD resources as the $filehandle parameter.
 
3:54 AM
@DaveyShafik have fun serializing a random file descriptor in a meaningful way (like to an anon pipe)
 
Abe
luckily gmp is not as widely used as bcmath
 
@bwoebi ¯\_(ツ)_/¯
 
that sounds like justification for GMP using objects, not removal of resources
 
A clear advantage would be __debugInfo() though :-)
But @DaveyShafik looks to me like libcurl is buggy regarding push_promises after a h2c upgrade request.
 
@bwoebi how so?
(and how can you tell? o.O)
@bwoebi h2c just shouldn't exist anyway
@bwoebi especially with LetsEncrypt on the horizon :)
 

« first day (1855 days earlier)      last day (3111 days later) »