Giter Site home page Giter Site logo

agoo's People

Contributors

askn avatar kalmanh avatar noraj avatar ohler55 avatar olleolleolle avatar paralax avatar robotex82 avatar stefsava avatar tikitdo avatar tomas avatar waghanza avatar y-yagi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agoo's Issues

Unable to install on Ubuntu

Building native extensions.  This could take a while...
ERROR:  Error installing agoo:
	ERROR: Failed to build gem native extension.

    current directory: /home/akhil/.rvm/gems/ruby-2.3.4/gems/agoo-2.5.1/ext/agoo
/home/akhil/.rvm/rubies/ruby-2.3.4/bin/ruby -r ./siteconf20181109-19394-9dexao.rb extconf.rb
creating Makefile
>>>>> Created Makefile for ruby version 2.3.4 on x86_64-linux <<<<<

current directory: /home/akhil/.rvm/gems/ruby-2.3.4/gems/agoo-2.5.1/ext/agoo
make "DESTDIR=" clean

current directory: /home/akhil/.rvm/gems/ruby-2.3.4/gems/agoo-2.5.1/ext/agoo
make "DESTDIR="
compiling error_stream.c
compiling res.c
compiling text.c
compiling subject.c
compiling sse.c
compiling response.c
compiling rack_logger.c
compiling sub.c
compiling pub.c
compiling rserver.c
compiling rlog.c
compiling hook.c
compiling bind.c
compiling dtime.c
compiling base64.c
compiling upgraded.c
In file included from /home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/oniguruma.h:103:0,
                 from /home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:23,
                 from upgraded.c:5:
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:149:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
 ^
In file included from /home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:23:0,
                 from upgraded.c:5:
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/oniguruma.h:115:9: error: unknown type name ‘ptrdiff_t’
 typedef ptrdiff_t      OnigPosition;
         ^
In file included from /home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:23:0,
                 from upgraded.c:5:
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/oniguruma.h:832:1: error: unknown type name ‘RUBY_SYMBOL_EXPORT_END’
 RUBY_SYMBOL_EXPORT_END
 ^
In file included from upgraded.c:5:0:
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:27:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘enum’
 enum ruby_encoding_consts {
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:29:28: error: ‘RUBY_FL_USHIFT’ undeclared here (not in a function)
     RUBY_ENCODING_SHIFT = (RUBY_FL_USHIFT+10),
                            ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:30:51: warning: left shift count >= width of type [-Wshift-count-overflow]
     RUBY_ENCODING_MASK = (RUBY_ENCODING_INLINE_MAX<<RUBY_ENCODING_SHIFT
                                                   ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:63:37: error: ‘RUBY_FL_USER8’ undeclared here (not in a function)
     RUBY_ENC_CODERANGE_7BIT = ((int)RUBY_FL_USER8),
                                     ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:64:38: error: ‘RUBY_FL_USER9’ undeclared here (not in a function)
     RUBY_ENC_CODERANGE_VALID = ((int)RUBY_FL_USER9),
                                      ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:118:22: error: unknown type name ‘VALUE’
 int rb_enc_get_index(VALUE obj);
                      ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:119:23: error: unknown type name ‘VALUE’
 void rb_enc_set_index(VALUE obj, int encindex);
                       ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:121:1: warning: parameter names (without types) in function declaration
 int rb_to_encoding_index(VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:122:1: warning: parameter names (without types) in function declaration
 rb_encoding *rb_to_encoding(VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:123:1: warning: parameter names (without types) in function declaration
 rb_encoding *rb_find_encoding(VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:124:1: warning: parameter names (without types) in function declaration
 rb_encoding *rb_enc_get(VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:125:1: warning: parameter names (without types) in function declaration
 rb_encoding *rb_enc_compatible(VALUE,VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:126:1: warning: parameter names (without types) in function declaration
 rb_encoding *rb_enc_check(VALUE,VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:127:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_associate_index(VALUE, int);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:127:37: error: expected ‘)’ before ‘int’
 VALUE rb_enc_associate_index(VALUE, int);
                                     ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:128:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_associate(VALUE, rb_encoding*);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:128:31: error: expected ‘)’ before ‘rb_encoding’
 VALUE rb_enc_associate(VALUE, rb_encoding*);
                               ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:129:18: error: unknown type name ‘VALUE’
 void rb_enc_copy(VALUE dst, VALUE src);
                  ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:129:29: error: unknown type name ‘VALUE’
 void rb_enc_copy(VALUE dst, VALUE src);
                             ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:131:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_str_new(const char*, long, rb_encoding*);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:132:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_str_new_cstr(const char*, rb_encoding*);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:133:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_str_new_static(const char*, long, rb_encoding*);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:134:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:135:13: error: unknown type name ‘VALUE’
 PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
             ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:135:68: error: expected declaration specifiers or ‘...’ before numeric constant
 PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
                                                                    ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:135:71: error: expected declaration specifiers or ‘...’ before numeric constant
 PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
                                                                       ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:136:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:139:1: error: unknown type name ‘VALUE’
 VALUE rb_obj_encoding(VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:139:1: warning: parameter names (without types) in function declaration
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:140:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:140:26: error: unknown type name ‘VALUE’
 VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc);
                          ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:141:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:143:1: error: unknown type name ‘VALUE’
 VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:144:1: error: unknown type name ‘VALUE’
 VALUE rb_str_export_to_enc(VALUE, rb_encoding *);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:144:35: error: expected ‘)’ before ‘rb_encoding’
 VALUE rb_str_export_to_enc(VALUE, rb_encoding *);
                                   ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:145:1: error: unknown type name ‘VALUE’
 VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:145:23: error: unknown type name ‘VALUE’
 VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
                       ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:146:1: error: unknown type name ‘VALUE’
 VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:146:28: error: unknown type name ‘VALUE’
 VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
                            ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:146:88: error: unknown type name ‘VALUE’
 VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
                                                                                        ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:163:13: error: unknown type name ‘NORETURN’
 PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4);
             ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:163:82: error: expected declaration specifiers or ‘...’ before numeric constant
 PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4);
                                                                                  ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:163:85: error: expected declaration specifiers or ‘...’ before numeric constant
 PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4);
                                                                                     ^
In file included from upgraded.c:5:0:
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:240:1: error: unknown type name ‘ID’
 ID rb_intern3(const char*, long, rb_encoding*);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:241:1: error: unknown type name ‘ID’
 ID rb_interned_id_p(const char *, long, rb_encoding *);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:244:1: warning: parameter names (without types) in function declaration
 int rb_enc_str_coderange(VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:246:1: warning: parameter names (without types) in function declaration
 int rb_enc_str_asciionly_p(VALUE);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:248:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_from_encoding(rb_encoding *enc);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:268:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_default_external(void);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:269:1: error: unknown type name ‘VALUE’
 VALUE rb_enc_default_internal(void);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:270:34: error: unknown type name ‘VALUE’
 void rb_enc_set_default_external(VALUE encoding);
                                  ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:271:34: error: unknown type name ‘VALUE’
 void rb_enc_set_default_internal(VALUE encoding);
                                  ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:272:1: error: unknown type name ‘VALUE’
 VALUE rb_locale_charmap(VALUE klass);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:272:25: error: unknown type name ‘VALUE’
 VALUE rb_locale_charmap(VALUE klass);
                         ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:280:1: error: unknown type name ‘ID’
 ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:281:1: error: unknown type name ‘VALUE’
 VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:283:1: error: unknown type name ‘RUBY_EXTERN’
 RUBY_EXTERN VALUE rb_cEncoding;
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:283:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rb_cEncoding’
 RUBY_EXTERN VALUE rb_cEncoding;
                   ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:299:1: error: unknown type name ‘VALUE’
 VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:299:21: error: unknown type name ‘VALUE’
 VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
                     ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:299:32: error: unknown type name ‘VALUE’
 VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
                                ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:299:55: error: unknown type name ‘VALUE’
 VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
                                                       ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:302:30: error: unknown type name ‘VALUE’
 int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags);
                              ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:302:45: error: unknown type name ‘VALUE’
 int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags);
                                             ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:303:27: error: unknown type name ‘VALUE’
 int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
                           ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:303:42: error: unknown type name ‘VALUE’
 int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
                                          ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:306:108: error: unknown type name ‘VALUE’
 rb_econv_t *rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts);
                                                                                                            ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:321:1: error: unknown type name ‘VALUE’
 VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:334:1: error: unknown type name ‘VALUE’
 VALUE rb_econv_make_exception(rb_econv_t *ec);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:343:1: error: unknown type name ‘VALUE’
 VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:343:44: error: unknown type name ‘VALUE’
 VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags);
                                            ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:344:1: error: unknown type name ‘VALUE’
 VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:344:47: error: unknown type name ‘VALUE’
 VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags);
                                               ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:345:1: error: unknown type name ‘VALUE’
 VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:345:43: error: unknown type name ‘VALUE’
 VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
                                           ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:345:54: error: unknown type name ‘VALUE’
 VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
                                                      ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:346:1: error: unknown type name ‘VALUE’
 VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:346:46: error: unknown type name ‘VALUE’
 VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
                                              ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:346:86: error: unknown type name ‘VALUE’
 VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
                                                                                      ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:347:1: error: unknown type name ‘VALUE’
 VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags);
 ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:347:75: error: unknown type name ‘VALUE’
 VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags);
                                                                           ^
In file included from /usr/include/poll.h:1:0,
                 from con.h:6,
                 from upgraded.c:7:
/usr/include/x86_64-linux-gnu/sys/poll.h:36:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
 typedef unsigned long int nfds_t;
 ^
/usr/include/x86_64-linux-gnu/sys/poll.h:57:40: error: unknown type name ‘nfds_t’
 extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
                                        ^
In file included from /usr/include/features.h:367:0,
                 from /usr/include/stdio.h:27,
                 from upgraded.c:3:
/usr/include/x86_64-linux-gnu/bits/poll2.h:26:12: error: unknown type name ‘nfds_t’
 extern int __REDIRECT (__poll_alias, (struct pollfd *__fds, nfds_t __nfds,
            ^
In file included from /usr/include/x86_64-linux-gnu/sys/poll.h:76:0,
                 from /usr/include/poll.h:1,
                 from con.h:6,
                 from upgraded.c:7:
/usr/include/x86_64-linux-gnu/bits/poll2.h:28:46: error: unknown type name ‘nfds_t’
 extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,
                                              ^
In file included from /usr/include/features.h:367:0,
                 from /usr/include/stdio.h:27,
                 from upgraded.c:3:
/usr/include/x86_64-linux-gnu/bits/poll2.h:30:12: error: unknown type name ‘nfds_t’
 extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
            ^
In file included from /usr/include/x86_64-linux-gnu/sys/poll.h:76:0,
                 from /usr/include/poll.h:1,
                 from con.h:6,
                 from upgraded.c:7:
/usr/include/x86_64-linux-gnu/bits/poll2.h:36:29: error: unknown type name ‘nfds_t’
 poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
                             ^
In file included from upgraded.c:5:0:
upgraded.c: In function ‘up_write’:
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:46:52: warning: right shift count >= width of type [-Wshift-count-overflow]
     (int)((RBASIC(obj)->flags & RUBY_ENCODING_MASK)>>RUBY_ENCODING_SHIFT)
                                                    ^
/home/akhil/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/encoding.h:52:40: note: in expansion of macro ‘RB_ENCODING_GET_INLINED’
 #define RB_ENCODING_IS_ASCII8BIT(obj) (RB_ENCODING_GET_INLINED(obj) == 0)
                                        ^
upgraded.c:186:6: note: in expansion of macro ‘RB_ENCODING_IS_ASCII8BIT’
  if (RB_ENCODING_IS_ASCII8BIT(msg)) {
      ^
Makefile:238: recipe for target 'upgraded.o' failed
make: *** [upgraded.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/akhil/.rvm/gems/ruby-2.3.4/gems/agoo-2.5.1 for inspection.
Results logged to /home/akhil/.rvm/gems/ruby-2.3.4/extensions/x86_64-linux/2.3.0/agoo-2.5.1/gem_make.out

__typename is not working properly

Hey again,

if you do the following request in the song example:

{
  artist(name:"Fazerdaze") {
    name
    songs{
      name
      duration
      __typename
    }
    __typename
  }
  __typename
}

You get:

{
  "errors": [
    {
      "message": "Internal error, failed to determine the __typename.",
      "code": "eval error",
      "timestamp": "2020-05-05T09:32:12.193248000Z"
    }
  ]
}

It's working on the query root with no problem. But as soon it's on a type, it's not working.

unable to build

Hi

I am unable to install this gem. This happens on 2 different systems, a Debian Jessie and a CentOS 7.

Debian (=> ruby-2.5.3 [ x86_64 ], gcc version 4.9.2 (Debian 4.9.2-10+deb8u1)

─> gem install agoo
Fetching: agoo-2.5.4.gem (100%)
Building native extensions. This could take a while...
ERROR:  Error installing agoo:
        ERROR: Failed to build gem native extension.

    current directory: /usr/local/rvm/gems/ruby-2.5.3/gems/agoo-2.5.4/ext/agoo
/usr/local/rvm/rubies/ruby-2.5.3/bin/ruby -r ./siteconf20181112-27751-1cadm1k.rb extconf.rb
creating Makefile
>>>>> Created Makefile for ruby version 2.5.3 on x86_64-linux <<<<<

current directory: /usr/local/rvm/gems/ruby-2.5.3/gems/agoo-2.5.4/ext/agoo
make "DESTDIR=" clean

current directory: /usr/local/rvm/gems/ruby-2.5.3/gems/agoo-2.5.4/ext/agoo
make "DESTDIR="
compiling agoo.c
compiling base64.c
compiling bind.c
compiling con.c
compiling debug.c
compiling dtime.c
compiling err.c
compiling error_stream.c
compiling hook.c
compiling http.c
http.c: In function ‘http_cleanup’:
http.c:498:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
     for (int i = BUCKET_SIZE; 0 < i; i--, sp++) {
     ^
http.c:498:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
http.c: At top level:
cc1: warning: unrecognized command line option "-Wno-self-assign"
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand"
cc1: warning: unrecognized command line option "-Wno-parentheses-equality"
cc1: warning: unrecognized command line option "-Wno-tautological-compare"
Makefile:241: recipe for target 'http.o' failed
make: *** [http.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.5.3/gems/agoo-2.5.4 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.5.3/extensions/x86_64-linux/2.5.0/agoo-2.5.4/gem_make.out

CentOS (ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux], gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC):

gem install agoo
Fetching: agoo-2.5.4.gem (100%)
Building native extensions. This could take a while...
ERROR:  Error installing agoo:
        ERROR: Failed to build gem native extension.

    current directory: /root/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/agoo-2.5.4/ext/agoo
/root/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20181112-21721-1oflkkp.rb extconf.rb
creating Makefile
>>>>> Created Makefile for ruby version 2.5.1 on x86_64-linux <<<<<

current directory: /root/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/agoo-2.5.4/ext/agoo
make "DESTDIR=" clean

current directory: /root/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/agoo-2.5.4/ext/agoo
make "DESTDIR="
compiling agoo.c
In file included from agoo.c:8:0:
debug.h:6:23: fatal error: stdatomic.h: No such file or directory
 #include <stdatomic.h>
                       ^
compilation terminated.
make: *** [agoo.o] Error 1

make failed, exit code 2

Gem files will remain installed in /root/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/agoo-2.5.4 for inspection.
Results logged to /root/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0-static/agoo-2.5.4/gem_make.out

Any suggestions?

Thanks!

UseCase - Image Upload

How to use this server for accepting image upload?
I know this is very straightforward but need someone's help in setting up the agoo server for this.

Uppercase Headers

I am trying out Agoo (it's really dang fast!) with an existing Rack project that's been running behind Puma and noticed two things about the headers that caught my eye.

  1. Though it may not be formally documented anywhere, I believe all uppercase header keys should be snake-case. For example, I believe HTTP_USER-AGENT should be HTTP_USER_AGENT (not the underscore instead of the dash).
  2. The keys alone should be uppercase, not the values.

Rails logger configuration

I'm looking to use agoo with a rails app. The performance is 💯 , but I can't get logs outputting. I've looked in the docs and examples on how to get rails logger wired up but I can't find anything.

Could I get some direction on how to wire those up?

Support for the Rack Websocket extension draft?

Hi,

I just discovered this project and it looks amazing!

I love the routing layer (I wanted to add something similar to iodine but haven't gotten around to it just yet, I want to make it all in C and support the /path/(:param) routing convention).

I was wondering if there's any chance I could interest you in supporting the Rack Websocket extension draft.

Specifically I would love it if your server supported the Websocket upgrade (using req['upgrade.websocket?']) and the optional pub/sub extensions (subscribe / publish / unsubscribe)?

There was a discussion about the draft between different Ruby server maintainers a while back (it started here and moved here), but nobody implemented the draft at the end of it (except me).

I believe these things should be separated from the application layer, as they seem to be network related concerns that should be embedded in the server.

The Websocket upgrade is relatively simple to implement (you can use C code from iodine or from facil.io, such as the Websocket parser / formatter).

The optional pub/sub can take a lot of work if you're supporting a cluster mode, but you don't have to implement it (it's an extension to the draft, not a requirement)... however, it would be beneficial to separate pub/sub logic from the application layer, especially if Redis or another network pub/sub service is attached.

Kindly,
Bo.

GraphQL with rack?

The GraphQL example starts its own server. I'm wondering if I can stick something in a config.ru file to accomplish the same thing.

require 'agoo'


map '/graphql' { run Agoo::GraphQL(some_schema) }

Or something

Could not run `agoo`

koyoko% agoo
Traceback (most recent call last):
	4: from /home/samuel/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `<main>'
	3: from /home/samuel/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `eval'
	2: from /home/samuel/.rvm/gems/ruby-2.5.0/bin/agoo:23:in `<main>'
	1: from /home/samuel/.rvm/gems/ruby-2.5.0/bin/agoo:23:in `load'
/home/samuel/.rvm/gems/ruby-2.5.0/gems/agoo-2.1.1/bin/agoo:54:in `<top (required)>': undefined method `new' for Agoo::Server:Module (NoMethodError)

Memory Leak?

I got up to a couple of Giga bytes when running a simple Hello World application...

This is my Rack application (config.ru):

module HelloWorld
  # This is the HTTP response object according to the Rack specification.
  RESPONSE = [200, { 'Content-Type' => 'text/html',
          'Content-Length' => '12' },
   ['Hello World!']]

   # this is function will be called by the Rack server (iodine) for every request.
   def self.call env
     # simply return the RESPONSE object, no matter what request was received.
     RESPONSE
   end
end

# this function call links our HelloWorld application with Rack
run HelloWorld

I ran Agoo using rackup:

$ RACK_ENV=production rackup -p 3000 -r agoo -s Agoo

I benchmarked the server with wrk:

wrk -c40 -d15 -t2 http://localhost:3000/

After a single benchmark on macOS 10.12.6 , I got memory consumption up to 3.33Gig.

I think the server is leaking memory or maintaining pointers to obsolete Ruby objects (the response isn't creating new objects, but maybe the handles cost memory).

Segfault on POST

Hi, I was trying out agoo, when I noticed that I get a segfault when I do a POST request to the server. I'm just using the quick start code. I know it doesn't handle a POST request, but I figure it shouldn't segfault regardless.

The code (no surprises here):

require 'agoo'

Agoo::Server.init(6464, 'root')

class MyHandler
  def call(req)
    puts(req)
    [200, {}, [ "hello world" ]]
  end
end


handler = MyHandler.new
Agoo::Server.handle(:GET, "/hello", handler)
Agoo::Server.start()

I get the nice big Ruby segfault error:

server.rb:15: [BUG] Segmentation fault at 0x0000000000000028
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0011 e:000010 CFUNC  :start
c:0002 p:0075 s:0007 E:0002f8 EVAL   server.rb:15 [FINISH]
c:0001 p:0000 s:0003 E:001ab0 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
server.rb:15:in `<main>'
server.rb:15:in `start'

-- Machine register context ------------------------------------------------
 rax: 0x0000000000000000 rbx: 0x00007fee7ea12460 rcx: 0x00007fff8b3a86b8
 rdx: 0x0000000000000003 rdi: 0x000000000000002a rsi: 0x00007fee7eace8f0
 rbp: 0x0000700000df2ef0 rsp: 0x0000700000df1e10  r8: 0x0000000000000074
  r9: 0x0000000000000001 r10: 0x00007fee7eadec50 r11: 0x00007fff5295f27c
 r12: 0x00007fee7e01c000 r13: 0x00007fee7eace9fc r14: 0x0000000000000001
 r15: 0x00007fee7eace9ce rip: 0x000000010750015c rfl: 0x0000000000010202

-- C level backtrace information -------------------------------------------
0   ruby                                0x0000000107209ed7 rb_vm_bugreport + 135
1   ruby                                0x000000010708f6a8 rb_bug_context + 472
2   ruby                                0x000000010717e491 sigsegv + 81
3   libsystem_platform.dylib            0x00007fff52bc4f5a _sigtramp + 26
4   agoo.bundle                         0x000000010750015c con_loop + 4076
5   libsystem_pthread.dylib             0x00007fff52bce661 _pthread_body + 340
6   libsystem_pthread.dylib             0x00007fff52bce50d _pthread_body + 0

-- Other runtime information -----------------------------------------------

* Loaded script: server.rb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/enc/encdb.bundle
    5 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/enc/trans/transdb.bundle
    6 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/rbconfig.rb
    7 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/compatibility.rb
    8 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/defaults.rb
    9 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/deprecate.rb
   10 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/errors.rb
   11 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/version.rb
   12 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/requirement.rb
   13 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/platform.rb
   14 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/basic_specification.rb
   15 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/stub_specification.rb
   16 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/util/list.rb
   17 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/stringio.bundle
   18 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/specification.rb
   19 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/exceptions.rb
   20 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/dependency.rb
   21 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_gem.rb
   22 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/monitor.rb
   23 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb
   24 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb
   25 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/path_support.rb
   26 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/version.rb
   27 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/core_ext/name_error.rb
   28 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/levenshtein.rb
   29 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/jaro_winkler.rb
   30 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/spell_checker.rb
   31 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/delegate.rb
   32 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   33 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   34 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
   35 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
   36 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/spell_checkers/key_error_checker.rb
   37 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/spell_checkers/null_checker.rb
   38 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean/formatters/plain_formatter.rb
   39 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib/did_you_mean.rb
   40 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/version.rb
   41 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/compatibility_guard.rb
   42 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/pathname.bundle
   43 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/pathname.rb
   44 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/constants.rb
   45 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/util.rb
   46 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/user_interaction.rb
   47 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/etc.bundle
   48 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/config_file.rb
   49 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/rubygems_integration.rb
   50 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/current_ruby.rb
   51 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb
   52 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/fileutils/lib/fileutils.rb
   53 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendored_fileutils.rb
   54 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb
   55 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/environment_preserver.rb
   56 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/plugin/api.rb
   57 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/plugin.rb
   58 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/source/git.rb
   59 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/source/installed.rb
   60 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/source/specific_file.rb
   61 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/source/local.rb
   62 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/source/lock.rb
   63 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/source/vendor.rb
   64 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/source.rb
   65 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/gem_helpers.rb
   66 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/match_platform.rb
   67 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/rubygems_ext.rb
   68 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/build_metadata.rb
   69 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler.rb
   70 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/rfc2396_parser.rb
   71 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/rfc3986_parser.rb
   72 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/common.rb
   73 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/generic.rb
   74 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/ftp.rb
   75 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/http.rb
   76 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/https.rb
   77 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/ldap.rb
   78 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/ldaps.rb
   79 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/mailto.rb
   80 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri.rb
   81 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/settings.rb
   82 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/ext/builder.rb
   83 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/feature_flag.rb
   84 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/source.rb
   85 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/source/path.rb
   86 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/source/git.rb
   87 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/source/rubygems.rb
   88 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/lockfile_parser.rb
   89 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/set.rb
   90 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/definition.rb
   91 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/dependency.rb
   92 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/ruby_dsl.rb
   93 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/dsl.rb
   94 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/source_list.rb
   95 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/source/metadata.rb
   96 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/lazy_specification.rb
   97 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/index.rb
   98 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb
   99 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/forwardable/impl.rb
  100 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/forwardable.rb
  101 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb
  102 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb
  103 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
  104 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
  105 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb
  106 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb
  107 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
  108 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb
  109 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb
  110 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb
  111 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb
  112 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb
  113 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb
  114 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
  115 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
  116 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/state.rb
  117 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb
  118 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
  119 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
  120 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb
  121 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb
  122 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendor/molinillo/lib/molinillo.rb
  123 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/vendored_molinillo.rb
  124 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/resolver/spec_group.rb
  125 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/resolver.rb
  126 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/gem_version_promoter.rb
  127 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/source/gemspec.rb
  128 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb
  129 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/dep_proxy.rb
  130 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/ui.rb
  131 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/ui/silent.rb
  132 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/ui/rg_proxy.rb
  133 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/remote_specification.rb
  134 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/stub_specification.rb
  135 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/endpoint_specification.rb
  136 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/ruby_version.rb
  137 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/bundler_version_finder.rb
  138 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/setup.rb
  139 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/agoo-2.5.0/lib/agoo/version.rb
  140 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/agoo-2.5.0/lib/rack/handler/agoo.rb
  141 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/agoo-2.5.0/lib/agoo/agoo.bundle
  142 /Users/nicholas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/agoo-2.5.0/lib/agoo.rb

I'm happy to fix this issue myself, but I'd highly appreciate any pointers or suggestions. I've attached the crash file below.

Thanks,
Nicholas

ruby_2018-08-30-004005_Nicholas-MacBook-Pro.crash.txt

`require': uninitialized constant StringIO (NameError)

Hello,

Just to clarify on the issue that occurs on newer versions of ruby 2.6.x in this case.

stringio is not loaded by default on later versions causing 'agoo' to fail when running example code for 'rack'

this can be solved by simply

replacing

     require 'agoo'

with

     require 'stringio'
     require 'agoo'

make sure the load order is correct as agoo will fail if stringio is not loaded in advance.

GraphQL access to request object and headers

First of all, thanks for the great gem! I'm currently integrating agoo into my ruby microservice framework and so far looks great.

I have one issue though, for which I could not find documentation or example: how do I access the http-request, cookies and headers in graphql handler? I need to implement somekind of authentication and cannot find a way how. For normal requests I can see these in handlers, but in graphql only args are given.

Static Assets

Sorry to bother you again, but I have a question about static assets. The docs say that the root passed to Agoo::Server.init is for static assets but it seems like there's more required to serve static assets than that.

I have compiled CSS and JS in public/assets and a robots.txt file at public/robots.txt. Initializing Agoo with Agoo::Server.init(3000, 'public') doesn't serve any of the static files in public. Adding Agoo::Server.path_group('/assets', ['public/assets']) gets Agoo serving all of the files from public/assets but I can't figure out how to get public/robots.txt served by Agoo. Any ideas?

What's the root passed into init actually do?

Thanks!

rb_rescue2(..., 0) is incorrect and can cause segfaults

Initially, we got this bug report oracle/truffleruby#1823 and created this spec:
https://github.com/ruby/ruby/blob/34b0a7be0ed2fd4ca4d1d509a22964b5e61dfe34/spec/ruby/optional/capi/ext/kernel_spec.c#L183-L196

However, that spec reliably segfaults on MRI, and so had to be disabled ruby/ruby@6eb3820

All usages of rb_rescue2(..., 0) should be replaced by rb_rescue2(..., (VALUE)0) as the documentation says:
https://github.com/ruby/ruby/blob/34b0a7be0ed2fd4ca4d1d509a22964b5e61dfe34/eval.c#L950

Notably there are some usages in

rb_rescue2(handle_base_inner, (VALUE)x, rescue_error, (VALUE)x, rb_eException, 0);

cc @aardvark179 @mame

CLI Support for `rackup` or `config.ru` Rack application?

HI,

I was wondering if there's any way to run Rack applications from the command line interface (CLI)?

The default Rack application file is config.ru and it might contain anything from a Rails application to a simple Hello World (example config.ru file):

out = [200, {"Content-Length" => "12"}, ["Welcome Home"] ].freeze
app = Proc.new { out }
run app

These can be executed using the rackup command using Puma, iodine, Thin, etc' by adding the -s flag.

Could agoo be added to this?

I'd love to be able to run Rails, Sinatra or any other application using:

$ rackup -s agoo

The downside is that rackup sometimes automatically adds middleware to the application (in development mode), so I'd be slightly happier if the CLI itself could run the config.ru app... This way, the Rack application could be executed without any surprises when agoo is called in the same folder as the app. i.e.:

$ agoo -p 3000

I know this will break backwards compatibility for the CLI, but using rackup should be possible without breaking backwards compatibility, shouldn't it?

Compilation on Mac requires OS X 10.12?

System: mid-2011 iMac, 3.1 GHz Intel Core i5, OS X 10.11.6

Running gem install agoo fails at line 365 of log.c, where the constant CLOCK_REALTIME is reported as nonexistent. The discussion on this SO question for an identically-manifesting error eventually converges on a consensus that Xcode 8 is required for that function, and thus OS X 10.12 (which is required to run Xcode 8).

It Would Be Very Nice If the OS X version restriction was noted prominently in the README. It would be even nicer (though unexpected) if anyone has ideas for a workaround that would support those of us thus far unable to migrate to (High) Sierra.

Output from running gem install agoo follows:

Building native extensions. This could take a while...
ERROR:  Error installing agoo:
	ERROR: Failed to build gem native extension.

    current directory: /Users/jeffdickey/src/ruby/the_app/tmp/gemset/gems/agoo-2.0.0/ext/agoo
/usr/local/Cellar/rbenv/1.1.1/versions/2.5.1/bin/ruby -r ./siteconf20180501-36922-1lvt4wa.rb extconf.rb
creating Makefile
>>>>> Created Makefile for ruby version 2.5.1 on x86_64-darwin15 <<<<<

current directory: /Users/jeffdickey/src/ruby/the_app/tmp/gemset/gems/agoo-2.0.0/ext/agoo
make "DESTDIR=" clean

current directory: /Users/jeffdickey/src/ruby/the_app/tmp/gemset/gems/agoo-2.0.0/ext/agoo
make "DESTDIR="
compiling agoo.c
compiling base64.c
compiling ccache.c
compiling con.c
compiling debug.c
compiling dtime.c
compiling err.c
compiling error_stream.c
compiling hook.c
compiling http.c
compiling log.c
log.c:365:2: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
        clock_gettime(CLOCK_REALTIME, &ts);
        ^
log.c:365:16: error: use of undeclared identifier 'CLOCK_REALTIME'
        clock_gettime(CLOCK_REALTIME, &ts);
                      ^
1 warning and 1 error generated.
make: *** [log.o] Error 1

make failed, exit code 2

Protect against smuggling attacks

Testbed used to verify the vulnerability: https://github.com/ohler55/agoo#rack
The following requests can be send via command line (tested on ubuntu) to reproduce the behaviour

Double Content Length Headers

printf 'GET /hello HTTP/1.1\r\n'
'Content-Length: 47\r\n'
'Content-Length: 0\r\n'
'Host: 127.0.0.1\r\n'
'\r\n'
'GET /smuggle HTTP/1.1\r\n'
'Host: 127.0.0.1\r\n'
'\r\n' | nc 127.0.0.1 80

Invalid Transfer Encoding Header

printf 'POST / HTTP/1.1\r\n'
'Host:localhost\r\n'
'tRANSFER-ENCODING: chunked\r\n'
'Content-Type: application/x-www-form-urlencoded\r\n'
'\r\n'
'0\r\n'
'\r\n'
| nc 127.0.0.1 80

Agoo allows multiple malformed variations of the Transfer Encoding header

A request with Content Length and malformed Transfer encoding headers that can be sent to a backend server and conduct CL:TE attacks. (https://memn0ps.github.io/2019/09/13/HTTP-Request-Smuggling-CL-TE.html)

POST /hello HTTP/1.1
Host: 127.0.0.1:6464
Content-Type: application/x-www-form-urlencoded
Content-Length: 6
Transfer-Encoding : chunked

0

X

In the above example, the request is sent with the Transfer encoding header having extra spaces (Transfer-Encoding : chunked). This is in violation of RFC 7230. Agoo was also found to allow multiple variations of bad transfer encoding headers including CRLF characters, Fake Transfer encoding etc. (See TE.TE behavior: obfuscating the TE header section: https://portswigger.net/web-security/request-smuggling)

Some other examples that is allowed:

Transfer-Encoding: chunk
Transfer-Encoding: ch–nked
Transfer-Encoding:ÿchunked
Transfer-Encoding:chunked
tRANSFER-ENCODING: chunked
[space here]Transfer-Encoding: chunked
Transfer-Encoding: chunked
Transfer-Encoding:chunked
Transfer-Encoding: "chunked"
Transfer-Encoding
: chunked
Transfer-Encoding: chunked

The above is proof of concept which just demonstrates the behaviour. Depending on how Algoo will be used as part of a chain of servers, this could result in a successful request smuggling attack. I am happy to provide more information regarding a successful attack.

Remediation

The best solution to remediate this vulnerability is to do the following:

  • Disallow requests with double content lengths headers
  • Ensure malformed Transfer encoding headers are not allowed. This can be done via rejecting the request and sending a 400 back to the HTTP client
  • As per RFC 7230, (https://tools.ietf.org/html/rfc7230#section-3.3.3) When requests with both Content-Length and Transfer encoding header is sent, the Content-Length header should be ignored

Remediation for the following open source projects can be used as a reference. The above points were taken from that.

• https://github.com/benoitc/gunicorn/issues/2176
• https://github.com/netty/netty/issues/9571
• https://docs.pylonsproject.org/projects/waitress/en/latest/#security-fixes

Second option in handler call method

I'm curious what the empty hash within a handler's #call method does. Clearly the first and last elements are response code and body, but I couldn't figure out what possible options could be passed to the {}. I dove into the source of Server#handle, but unfortunately couldn't get it figured out.

class MyHandler
  def call(req)
    [ 200, { }, [ "hello world" ] ]
  end
end

This isn't really an "issue," but I wasn't sure where else to ask it. Sorry if the answer is obvious : )

How does agoo talk to rails?

I have read over the code over and over and have been cutting things down to make a simpler version but I don't see how its talking to rails.

For example, when thin talks to rails it requires the dispatch package. But I don't see anything like that in the code. Can you explain that or point the code that specifically talks to rails to build the page that is handed to the client?

Thanks

Segfault

I'm using rails 5.1.6 and the command: rackup -r agoo -s agoo

/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/agoo-2.11.0/lib/rack/handler/agoo.rb:166: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   for more details.
Don't forget to include the above Crash Report log file in bug reports.

-- Control frame information -----------------------------------------------
c:0010 p:---- s:0067 e:000066 CFUNC  :start
c:0009 p:0420 s:0063 E:002150 METHOD /Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/agoo-2.11.0/lib/rack/handler/agoo.rb:166
c:0008 p:0195 s:0043 E:001a68 METHOD /Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/rack-2.0.7/lib/rack/server.rb:297
c:0007 p:0012 s:0036 E:001a98 METHOD /Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/rack-2.0.7/lib/rack/server.rb:148
c:0006 p:0019 s:0031 E:001ac0 TOP    /Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/rack-2.0.7/bin/rackup:4 [FINISH]
c:0005 p:---- s:0028 e:000027 CFUNC  :load
c:0004 p:0109 s:0023 E:001700 EVAL   /Users/ben.dangelo/.rvm/gems/ruby-2.6.2/bin/rackup:23 [FINISH]
c:0003 p:---- s:0018 e:000017 CFUNC  :eval
c:0002 p:0195 s:0011 E:002248 EVAL   /Users/ben.dangelo/.rvm/gems/ruby-2.6.2/bin/ruby_executable_hooks:24 [FINISH]
c:0001 p:0000 s:0003 E:001270 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/bin/ruby_executable_hooks:24:in `<main>'
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/bin/ruby_executable_hooks:24:in `eval'
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/bin/rackup:23:in `<main>'
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/bin/rackup:23:in `load'
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/rack-2.0.7/bin/rackup:4:in `<top (required)>'
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/rack-2.0.7/lib/rack/server.rb:148:in `start'
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/rack-2.0.7/lib/rack/server.rb:297:in `start'
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/agoo-2.11.0/lib/rack/handler/agoo.rb:166:in `run'
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/agoo-2.11.0/lib/rack/handler/agoo.rb:166:in `start'

-- Machine register context ------------------------------------------------
 rax: 0x7571657220676e69 rbx: 0x0000000000000000 rcx: 0x914fe3ac2e6e00e8
 rdx: 0x0000000104361268 rdi: 0x00007fb244705a28 rsi: 0x0000000000000006
 rbp: 0x00007ffeebd38da0 rsp: 0x00007ffeebd38d30  r8: 0x0407ce2acf22189e
  r9: 0x00007fb23c502370 r10: 0x0000000000000000 r11: 0x0000000104460d98
 r12: 0x00007fb24343fa00 r13: 0x00007fb24343fa00 r14: 0x00007fb24343fa00
 r15: 0x00000001066086a0 rip: 0x000000010660888f rfl: 0x0000000000010202

-- C level backtrace information -------------------------------------------
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_vm_bugreport+0x82) [0x104108382]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_bug_context+0x1d3) [0x103f53f33]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(sigsegv+0x51) [0x10406c311]
/usr/lib/system/libsystem_platform.dylib(_sigtramp+0x1d) [0x7fff79672b5d]
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/agoo-2.11.0/lib/agoo/agoo.bundle(handle_rack_inner+0x7f) [0x10660888f]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_rescue2+0x155) [0x103f5f705]
/Users/ben.dangelo/.rvm/gems/ruby-2.6.2/gems/agoo-2.11.0/lib/agoo/agoo.bundle(rserver_start+0x2d9) [0x1066074b9]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(vm_call_cfunc+0x161) [0x1040fad71]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(vm_exec_core+0x34bf) [0x1040e15df]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_vm_exec+0xa6e) [0x1040f57ee]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_load_internal0+0x192) [0x103fb1f62]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_f_load+0xb5) [0x103fb3105]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(vm_call_cfunc+0x161) [0x1040fad71]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(vm_exec_core+0x34bf) [0x1040e15df]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_vm_exec+0xa6e) [0x1040f57ee]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_f_eval+0x2d9) [0x1040ef5c9]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(vm_call_cfunc+0x161) [0x1040fad71]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(vm_exec_core+0x34bf) [0x1040e15df]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(rb_vm_exec+0xa6e) [0x1040f57ee]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(ruby_exec_internal+0xe8) [0x103f5f008]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/libruby.2.6.dylib(ruby_run_node+0x49) [0x103f5ee79]
/Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/bin/ruby(main+0x5d) [0x103ec5f0d]

-- Other runtime information -----------------------------------------------

* Loaded script: /Users/ben.dangelo/.rvm/gems/ruby-2.6.2/bin/rackup

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/x86_64-darwin18/enc/encdb.bundle
    5 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/x86_64-darwin18/enc/trans/transdb.bundle
    6 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/x86_64-darwin18/rbconfig.rb
    7 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/compatibility.rb
    8 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/defaults.rb
    9 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/deprecate.rb
   10 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/errors.rb
   11 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/version.rb
   12 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/requirement.rb
   13 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/platform.rb
   14 /Users/ben.dangelo/.rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/basic_specification.rb

Static File Headers

This is more of a question than an issue, I hope that's ok. Is there any way to add additional headers to the HTTP response returned from static assets?

One of the nice things about Agoo is that it obviates the need for e.g. Rack::Static, but one of the features Rack::Static has that I can't figure out how to replicate with Agoo is the ability to set response headers like Cache-Control. For example, I have Rack::Static set up like this:

use Rack::Static,
  root: 'public',
  urls: %w[/assets /50x.html /favicon.ico /robots.txt],
  header_rules: [
    [%w[css js svg png jpg jpeg ico gif ttf woff woff2], { Rack::CACHE_CONTROL => 'public, max-age=31536000' }],
    [%w[ttf woff woff2], { 'Access-Control-Allow-Origin' => '*' }]
  ]

The exact implementation/configuration isn't all that important, but the ability to set response headers for those static assets would be great. What do you think?

Worker count when using rackup?

Hi, great work with agoo!

I'm trying to fire the server through rackup (using a regular config.ru) but I'm not sure how to set the number of workers. I tried putting something like this on the config.ru file itself:

Agoo::Server.init(6471, 'root', thread_count: 8, worker_count: 4)

But no workie. How do I accomplish this?

Hook before graphql request is handled

Hey,

is it possible to apply a hook like

Agoo::GraphQL.build_headers

not for the response but for the request? To be able to check the request headers and decide to continue to proceed the request or to block/redirect it?

Unconditional use of `SO_REUSEPORT`

agoo makes unconditional use of the socket option SO_REUSEPORT.

As explained here and there, its semantics are different on Linux (load-balancing between multiple servers/threads) and BSDs (the last server to bind gets the new connections).

Both are in fact pretty useful (the second one allows for seamless server restarts), but since they have different use cases, it would be interesting to clarify what was intended. Also the StackOverflow post linked above mentions that recent FreeBSDs have SO_REUSEPORT_LB that behaves like the Linux version.

See discussion at oracle/truffleruby#1592

Integration with Rails

Found out agoo from awesome_ruby page, impressed with the benchmark. I would like to know is 'agoo' can be a replacement of 'puma' and run on rails out of the box?

How to use Rack::Cors

Hi,

I'm trying to setup CORS on an Agoo server using the rack-cors gem, but:

use Rack::Cors do
# ...

in config.ru complains that Rack::Cors is an uninitialized constant, and requiring rack-cors complains that it cannot be found, despite installing it.

Is there a specific way I need to attach Rack middleware to Agoo?

New lines in header values

I've run into a problem running Agoo behind an HTTP/2 capable load balancer where both Safari and curl throw a protocol error when new line characters \n are present in header values, specifically the Set-Cookie header in my case. Normally, I'd use a middleware to transform the values on the way out, but the problem is with Rack and, I think, Agoo's conformance to Rack's spec.

Rack's spec says:

The values of the header must be Strings, consisting of lines (for multiple header values, e.g. multiple Set-Cookie values) separated by “\n”.

Apparently, it's up to the handler to transform the lines into proper HTTP headers, without the new lines. There's a comment toward the bottom of that issue that illustrates what I mean and the next comment, from a Rack contributor, confirms that's what Rack expects to happen.

I can put together a working example if you'd like me to.

Bind to socket

I might have missed it in the code, but is it possible to bind to a socket instead of host + port?

TypeError: no implicit conversion of Agoo::ErrorStream into String

The Rack::CommonLogger middleware initializer calls ::Logger.new(env[RACK_ERRORS]), but env[RACK_ERRORS] doesn't seem to respond to to_s, raising this TypeError.

./lib/ruby/2.5.0/logger.rb in initialize
     File.open(filename, (File::WRONLY | File::APPEND))
./lib/ruby/2.5.0/logger.rb in open
     File.open(filename, (File::WRONLY | File::APPEND))
./lib/ruby/2.5.0/logger.rb in open_logfile
     File.open(filename, (File::WRONLY | File::APPEND))
./lib/ruby/2.5.0/logger.rb in set_dev
     @dev = open_logfile(log)
./lib/ruby/2.5.0/logger.rb in initialize
     set_dev(log)
./lib/ruby/2.5.0/logger.rb in new
     @logdev = LogDevice.new(logdev, :shift_age => shift_age,
./lib/ruby/2.5.0/logger.rb in initialize
     @logdev = LogDevice.new(logdev, :shift_age => shift_age,
./lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/logger.rb in new
     logger = ::Logger.new(env[RACK_ERRORS])
./lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/logger.rb in call
     logger = ::Logger.new(env[RACK_ERRORS])
./lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/common_logger.rb in call
     status, header, body = @app.call(env)

Planned features

I'd like to know if there's a road map.

  • What is planned next?
  • Is IPv6 on the list?
  • Where do you need support?

Great work by the way!

Problem install in windows

λ gem install agoo
Temporarily enhancing PATH for MSYS/MINGW...
ERROR: While executing gem ... (Gem::Package::PathError)
installing into parent path //./con of C:/Ruby/lib/ruby/gems/2.5.0/gems/agoo-2.5.1 is not allowed

λ gem env version
2.7.7

Nome SO: Microsoft Windows 7 Enterprise
Versione SO: 6.1.7601 Service Pack 1 build 7601

λ ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]

Compiling on alpine

Hi @ohler55,

Trying to install on alpine, I have

dtime.c:11:31: error: 'CLOCK_REALTIME' undeclared (first use in this function); did you mean 'CLOCK_REALTIME_COURSE'?
 #define CLOCK_REALTIME_COURSE CLOCK_REALTIME

while using gem install agoo

I'm on

  • ruby 2.6
  • gem 3.06

Regards,


edit : maybe related to #14

gem install failed

I tried sudo gem install agoo

Got:

current directory: /var/lib/gems/2.5.0/gems/agoo-2.11.1/ext/agoo
/usr/bin/ruby2.5 -r ./siteconf20191015-3011-yr12la.rb extconf.rb
checking for stdatomic.h... yes
checking for openssl/ssl.h... yes
checking for -lssl... yes
creating Makefile
>>>>> Created Makefile for ruby version 2.5.5 on x86_64-linux-gnu <<<<<

current directory: /var/lib/gems/2.5.0/gems/agoo-2.11.1/ext/agoo
make "DESTDIR=" clean

current directory: /var/lib/gems/2.5.0/gems/agoo-2.11.1/ext/agoo
make "DESTDIR="
compiling agoo.c
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from agoo.c:8:
/usr/include/ruby-2.5.0/ruby/intern.h:887:29: warning: ‘struct timespec’ declared inside parameter list will not be visible outside of this definition or declaration
 void rb_timespec_now(struct timespec *);
                             ^~~~~~~~
/usr/include/ruby-2.5.0/ruby/intern.h:890:41: warning: ‘struct timespec’ declared inside parameter list will not be visible outside of this definition or declaration
 VALUE rb_time_timespec_new(const struct timespec *, int);
                                         ^~~~~~~~
compiling base64.c
compiling bind.c
In file included from bind.c:13:
bind.c: In function ‘agoo_bind_port’:
debug.h:39:26: warning: implicit declaration of function ‘strdup’; did you mean ‘strcmp’? [-Wimplicit-function-declaration]
 #define AGOO_STRDUP(str) strdup(str)
                          ^~~~~~
bind.c:27:23: note: in expansion of macro ‘AGOO_STRDUP’
  if (NULL == (b->id = AGOO_STRDUP(id))) {
                       ^~~~~~~~~~~
bind.c:27:21: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  if (NULL == (b->id = AGOO_STRDUP(id))) {
                     ^
bind.c: In function ‘url_tcp’:
bind.c:42:20: warning: implicit declaration of function ‘index’ [-Wimplicit-function-declaration]
     char  *colon = index(url, ':');
                    ^~~~~
bind.c:42:20: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
bind.c:59:11: warning: implicit declaration of function ‘inet_aton’; did you mean ‘inet_pton’? [-Wimplicit-function-declaration]
  if (0 == inet_aton(buf, &addr)) {
           ^~~~~~~~~
           inet_pton
bind.c:72:21: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  if (NULL == (b->id = AGOO_STRDUP(id))) {
                     ^
bind.c: In function ‘url_tcp6’:
bind.c:92:18: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
     char  *end = index(url, ']');
                  ^~~~~
bind.c:114:21: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  if (NULL == (b->id = AGOO_STRDUP(buf))) {
                     ^
bind.c: In function ‘url_named’:
bind.c:143:27: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      if (NULL == (b->name = AGOO_STRDUP(url))) {
                           ^
bind.c:149:25: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
      if (NULL == (b->id = AGOO_STRDUP(id))) {
                         ^
bind.c: In function ‘url_ssl’:
bind.c:168:20: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
     char  *colon = index(url, ':');
                    ^~~~~
bind.c:207:21: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  if (NULL == (b->id = AGOO_STRDUP(id))) {
                     ^
bind.c: In function ‘agoo_bind_url’:
bind.c:249:16: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  char *colon = index(url, ':');
                ^~~~~
compiling con.c
con.c: In function ‘should_close’:
con.c:224:28: warning: implicit declaration of function ‘strncasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
  return (5 == vlen && 0 == strncasecmp("Close", v, 5));
                            ^~~~~~~~~~~
                            strncmp
compiling debug.c
compiling doc.c
compiling domain.c
In file included from domain.c:7:
domain.c: In function ‘agoo_domain_add’:
debug.h:39:26: warning: implicit declaration of function ‘strdup’; did you mean ‘strcmp’? [-Wimplicit-function-declaration]
 #define AGOO_STRDUP(str) strdup(str)
                          ^~~~~~
domain.c:33:28: note: in expansion of macro ‘AGOO_STRDUP’
     if (NULL == (d->host = AGOO_STRDUP(host))) {
                            ^~~~~~~~~~~
domain.c:33:26: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
     if (NULL == (d->host = AGOO_STRDUP(host))) {
                          ^
domain.c:36:26: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
     if (NULL == (d->path = AGOO_STRDUP(path))) {
                          ^
domain.c: In function ‘agoo_domain_add_regex’:
domain.c:61:26: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
     if (NULL == (d->path = AGOO_STRDUP(path))) {
                          ^
compiling dtime.c
dtime.c: In function ‘dtime’:
dtime.c:18:5: warning: implicit declaration of function ‘clock_gettime’; did you mean ‘localtime’? [-Wimplicit-function-declaration]
     clock_gettime(CLOCK_REALTIME_COURSE, &ts);
     ^~~~~~~~~~~~~
     localtime
dtime.c:11:31: error: ‘CLOCK_REALTIME’ undeclared (first use in this function); did you mean ‘CLOCK_REALTIME_COURSE’?
 #define CLOCK_REALTIME_COURSE CLOCK_REALTIME
                               ^~~~~~~~~~~~~~
dtime.c:18:19: note: in expansion of macro ‘CLOCK_REALTIME_COURSE’
     clock_gettime(CLOCK_REALTIME_COURSE, &ts);
                   ^~~~~~~~~~~~~~~~~~~~~
dtime.c:11:31: note: each undeclared identifier is reported only once for each function it appears in
 #define CLOCK_REALTIME_COURSE CLOCK_REALTIME
                               ^~~~~~~~~~~~~~
dtime.c:18:19: note: in expansion of macro ‘CLOCK_REALTIME_COURSE’
     clock_gettime(CLOCK_REALTIME_COURSE, &ts);
                   ^~~~~~~~~~~~~~~~~~~~~
dtime.c: In function ‘dsleep’:
dtime.c:32:9: warning: implicit declaration of function ‘nanosleep’; did you mean ‘dsleep’? [-Wimplicit-function-declaration]
     if (nanosleep(&req, &rem) == -1 && EINTR == errno) {
         ^~~~~~~~~
         dsleep
make: *** [Makefile:243: dtime.o] Error 1

make failed, exit code 2

Ubuntu 19.04
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnu]

Compiling fails on Fedora 27 with gcc executable

Even though I have the right version of gcc:

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)

I cannot compile agoo:

$ gem install agoo
Building native extensions.  This could take a while...
ERROR:  Error installing agoo:
	ERROR: Failed to build gem native extension.

    current directory: /home/strzibny/.gem/ruby/gems/agoo-2.0.0/ext/agoo
/usr/bin/ruby -r ./siteconf20180504-3724-lxfgae.rb extconf.rb
creating Makefile
>>>>> Created Makefile for ruby version 2.4.3 on x86_64-linux <<<<<

current directory: /home/strzibny/.gem/ruby/gems/agoo-2.0.0/ext/agoo
make "DESTDIR=" clean
rm -f 
rm -f agoo.so  *.o  *.bak mkmf.log .*.time

current directory: /home/strzibny/.gem/ruby/gems/agoo-2.0.0/ext/agoo
make "DESTDIR="
gcc-7 -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I.   -DPLATFORM_LINUX -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -fPIC -m64 -o agoo.o -c agoo.c
make: gcc-7: Command not found
make: *** [Makefile:243: agoo.o] Error 127

make failed, exit code 2

The build step expects gcc to be called gcc-7 but on Fedora 27 it's just called gcc. I believe this would be the case for other systems as well.

Segmentation fault

I'm not 100% sure that this is an issue with Agoo, but I never encountered segfaults with Puma and they only started showing up after I switched. I can't seem to reliably reproduce the problem, but seemingly random navigation around my app will segfault and crash the server.

Here's the segfault crash log
server.rb:47: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   for more details.
Don't forget to include the above Crash Report log file in bug reports.

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0011 e:000010 CFUNC  :start
c:0002 p:0329 s:0007 E:001c68 EVAL   server.rb:47 [FINISH]
c:0001 p:0000 s:0003 E:000b50 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
server.rb:47:in `<main>'
server.rb:47:in `start'

-- Machine register context ------------------------------------------------
 rax: 0xc00007fa849acc6d rbx: 0xfffffffffffffff8 rcx: 0x0000000000000009
 rdx: 0x00007fa846701ac0 rdi: 0x00007fa847bed920 rsi: 0x00007fa846835d60
 rbp: 0x00007ffee0cf0da0 rsp: 0x00007ffee0cf0d50  r8: 0xd084f413c06d4000
  r9: 0x0000000111a9cbb8 r10: 0x0000000000000008 r11: 0x23fed980c2341dea
 r12: 0x00007fa846835ba8 r13: 0x00007fa848fa8d00 r14: 0x00007fa848fa8d00
 r15: 0x00007fa847bed920 rip: 0x0000000111a86d47 rfl: 0x0000000000010202

-- C level backtrace information -------------------------------------------
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(rb_vm_bugreport+0x82) [0x10f14ffb2]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10ef9b5e3) [0x10ef9b5e3]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10f0b4171) [0x10f0b4171]
/usr/lib/system/libsystem_platform.dylib(_sigtramp+0x1d) [0x7fff5f023b5d]
/Users/evan/.asdf/installs/ruby/2.6.4/lib/ruby/gems/2.6.0/gems/agoo-2.11.0/lib/agoo/agoo.bundle(request_env+0x247) [0x111a86d47]
/Users/evan/.asdf/installs/ruby/2.6.4/lib/ruby/gems/2.6.0/gems/agoo-2.11.0/lib/agoo/agoo.bundle(0x111a8e7f2) [0x111a8e7f2]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10efa6d05) [0x10efa6d05]
/Users/evan/.asdf/installs/ruby/2.6.4/lib/ruby/gems/2.6.0/gems/agoo-2.11.0/lib/agoo/agoo.bundle(0x111a8d469) [0x111a8d469]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10f142a51) [0x10f142a51]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10f12931f) [0x10f12931f]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10f13d4b0) [0x10f13d4b0]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10efa6616) [0x10efa6616]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10efa6489) [0x10efa6489]
/Users/evan/.asdf/installs/ruby/2.6.4/bin/ruby(0x10ef0f53d) [0x10ef0f53d]

I left off the loaded features because it's like 1100 lines but I'm happy to add them here if it'd help. Is there anything you can glean from this crash log? Is it possible that this has nothing to do with Agoo?

Thanks for taking a look, I appreciate it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.