Categories
Programmer's Mindset

Asterisk astobj2.c: bad magic number for object 0x7ff6ac021888. Object is likely destroyed.

Recently we had 2 asterisk servers that were segfaulting, and of course when that happened, all current calls were lost.  This was very frustrating for our customers, our customer service reps, and of course for the us developers.  It was very hard to explain, there was not silver bullet saying “X” is responsible.

So, my boss Kevin and I spent time going through log files, analyzing time lines, researching on the Internet, etc…

Our conclusion is still dumbfounding.

We recently added a new outbound sip provider.  We started only giving them a small percentage of our overall traffic.  During this time we saw 0-1 segfaults each day.  But we didn’t even know about some of them because asterisk started right back up, and unless there was a complaint, we wouldn’t know.

Of course we got the occasional complaint, but we didn’t have an answer.  All of a sudden the last couple of days was showing 4-5 segfaults per day.  Some happening within 20 minutes of each other.  This was very unacceptable and we spent a lot of time trying to narrow down the issue.  It so happened that 2 days ago, we ramped up the amount of traffic this new provider was receiving, subsequently increasing the odds of segfaulting.

At this point, we still don’t know what actually caused the segfault.  We just know that removing that carrier has so far stopped them from happening.

Ugggg… what a PITA.

Categories
Bitcoin

Should My Website Accept Bitcoins?

If you own a website that accepts money, you should be asking yourself this question.

To me, this is like asking if you should accept Yen, Euros, or Pesos.  The fact is, you probably already accept these other forms of currency and don’t even realize it.  Payment processors like PayPal or other gateways handle those exchanges for you.  You tell the processor you want $100 for some goods, the customer pays (currently 10172.00) Yen, and you do not know the difference.

Same thing happens with bitcoin.  Through a payment processor like Coinbase, you can easily accept bitcoin payments and immediately turn them into US Dollars.  The processing fees are so much lower as well, roughly 1%.  Compare that to the 3% that credit card processors charge.

Not to mention, the chance of chargebacks are absolutely zero.  Because bitcoin is a push payment, the customer has to choose to send you bitcoin.  You can’t take what you want, like you do with credit cards.

So the answer to “Should my website accept bitcoins?” is absolutely yes.

Categories
Bitcoin

BitCoins: My Opinion

So, I first heard of bitcoins a few years ago and didn’t wrap my head around them at that time.  (STUPID ME)

I decided to learn more about them late last year.  I had lots of questions myself, and hear them from others, so I want to try and answer some of them from my viewpoint.

Questions that confused me:

  • What are they?
    • First, realize that they are not physical coins.  They are digital tokens (for lack of a better word)
    • These “coins” are generated through mathematical algorithms at a predetermined pace, currently 25 about every 10 minutes.
    • Over time, the amount created will be reduced.  Actually, they are cut in half every 4 years.  At the beginning, they were generated at 50 coins every 10 minutes.
  • How are they generated?
    • They are generated through “mining”.  It’s analogous to gold mining.
    • I recently heard a great analogy.  If you play Sudoku, you know that the puzzles can be hard to solve, but very easy to verify.  This is the key, hard to solve, easy to verify.
    • So every 10 minutes (or so), a kind of computer puzzle is generated.  Thousands of computers around the world try to solve it.  The first computer to solve it correctly, receives the prize (currently 25 bitcoins).  As computers get faster, the puzzles are made more difficult, to try and keep the rate at 1 puzzle every 10 minutes.
  • Should I get into mining?
    • As it turns out, the answer is really no.  Most miners are using very high end computer equipment, running specialized hardware for this.
    • If you do, you should participate in a mining pool, so even if you don’t solve the puzzle, you receive a portion of the prize.
  • If I don’t mine, how do I get them?
    • Turns out easily.  Buy them with USD.  Just like you get Japanese Yen, Mexican Pesos, Euros, etc…
    • There is an exchange rate, so you can exchange money for bitcoins
    • Barter or Sell stuff.  Just like other currency, it’s only worth what someone else will give you for it.

If you are a merchant selling good and services, why would you not accept this currency?  The most usual reason is that merchants don’t know what bitcoin is and they are concerned about the exchange rate screwing them up.  The fact is that as a merchant, you may already be dealing with this very issue.  Your payment gateway may accept Japanese Yen from your customer and turn it into US Dollars for you, without you even knowing.  You can do the same with BitCoin.  Coinbase is currently the largest exchange for bitcoin.  You can think of them just like PayPal, but for this new digital currency.

Furthermore, there are more and more businesses accepting bitcoin as a form of payment.  You can find local businesses through coinmap.org if you are interested.  I’ve seen articles from other people that have tried to live solely on bitcoin, and mostly successfully.  There are some obvious restrictions right now, as not everyone will accept them.