Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
pinba-engine does not compile under osx (homebrew) #40
Comments
casterx
commented
Apr 27, 2015
|
+1, I have the same error, cannot compile pinba 1.1.0 |
|
Does this patch help: https://gist.github.com/17ee3f9cde526a4eae28 ? |
casterx
commented
Apr 27, 2015
|
Yes it does, thanks! |
|
Are you using OS X too, by any chance? |
neanton
commented
Apr 27, 2015
|
I can confirm it compiles now, but
Here is the output of lldb backtrace:
I can provide additional information if required. |
|
Ok, what do you get with |
neanton
commented
Apr 27, 2015
|
Here is the output:
Thread 25 shows somethig related to pinba:
|
|
Okay, so pthread_cancel() doesn't seem to break the eventloop on OS X. |
|
If you're using this MySQL instance for Pinba only (which I do recommend), then you can safely kill it with |
neanton
commented
Apr 27, 2015
|
Okay. Thanks. Ping me later if you'll need some additional info/tests. |
|
Yes, it seems that this problem is inherited throughout all *BSD family. |
neanton
commented
Apr 27, 2015
|
Does not help. Maybe I should recompile MySQL/pinba-engine with debugging support to help finding out the issue? |
|
Yes, recompiling MySQL and pinba with debug symbols would help to pinpoint the place where it's stuck, but I'm fairly sure I know where it is. |
added a commit
that referenced
this issue
Apr 28, 2015
|
Please try & see if branch devel_kevent_workaround fixes it for you. |
neanton
commented
Apr 28, 2015
|
Not sure if I've compiled it properly, but it does not work yet. BTW, |
casterx
commented
Apr 28, 2015
|
Hi, can we have the fix (for compiling) in master branch and release 1.1.1 first? Then we can keep investigating and fix the issue with shutting down later? |
vincentbernat
commented
Jul 24, 2015
|
I also have the same compilation problem on Linux i386:
The initial patch proposed by @tony2001 is not available anymore. Does changing the type of str_hash to |
casterx
commented
Jul 25, 2015
|
Here is the patch diff --git a/src/ha_pinba.cc b/src/ha_pinba.cc
index 8c71010..85193bb 100644
--- a/src/ha_pinba.cc
+++ b/src/ha_pinba.cc
@@ -2684,7 +2684,7 @@ int ha_pinba::read_next_row(unsigned char *buf, uint active_index, bool by_key)
str_hash = this_index[active_index].ival;
- ppvalue = JudyLNext(D->tag.name_index, &str_hash, NULL);
+ ppvalue = JudyLNext(D->tag.name_index, (Word_t *)&str_hash, NULL);
if (!ppvalue) {
ret = HA_ERR_END_OF_FILE;
goto failure;It works for me |
vincentbernat
commented
Jul 25, 2015
|
It would break on big endian architectures, I think. The value pointed for this_index[active_index].ival = str_hash;Maybe this is OK because this is consistent with what is done everywhere but since this is the only place where we do that, I think this is not. |
juricast
commented
May 24, 2016
•
|
Hello, I am sending a patch for this package. With this patch package was successfully built on mips, mipsel, i386 on Debian. I have changed a type of str_hash in file src/ha_pinba.cc. --- pinba-engine-mysql-1.1.0.orig/src/ha_pinba.cc
+++ pinba-engine-mysql-1.1.0/src/ha_pinba.cc
@@ -2680,7 +2680,7 @@ int ha_pinba::read_next_row(unsigned cha
PPvoid_t ppvalue;
char name[PINBA_MAX_LINE_LEN] = {0};
pinba_tag *tag;
- uint64_t str_hash;
+ Word_t str_hash;
str_hash = this_index[active_index].ival;
Loking at a pinba-engine-mysql-1.1.0/src/ha_pinba.h one can notice that ival is of type size_t: typedef struct pinba_index_st { /* {{{ */
union {
size_t ival;
struct {
unsigned char *val;
uint len;
} str;
};
struct {
unsigned char *val;
uint len;
} subindex;
size_t position;
} pinba_index_st;
/* }}} */
However if we replace "uint64_t str_hash;" with "size_t str_hash;" on 32bit archs we have following problem: ha_pinba.cc:2687:59: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'Word_t* {aka long unsigned int*}' [-fpermissive]
Taking a look at a Word_t one can find that: Same size as size_t but on 32bit one is "unsigned int" (size_t) and the other "long unsigned int" (Word_t) Taking this into consideration I have proposed a patch that I think it is safer than previously proposed patch that include type casting, which will probably fail during run-time on big-endian. Could you please consider including this patch? Thank you! Regards, |
latinovic
commented
Jun 20, 2016
|
The patch that Jurica had proposed worked for me. |
neanton commentedApr 22, 2015
Here is a message I get when I'm trying to build pinba.
I have following source packages:
Seems like changing type of
str_hashtoWord_tsolves the issue but I'm not sure it's a correct way of fixing this. Maybe related with 64-bit platform?